Log in

View Full Version : Error: Unable to locate 'stdio.h'


phrontist
07-02-2005, 14:50
I'm trying to compile the default camera code, and getting the following error:

Clean: Deleting intermediary and output files.
Clean: Done.
Executing: "C:\mcc18\bin\mcc18.exe" -p=18F8520 "main.c" -fo="main.o" /i"C:\mcc18\h" -D_FRC_BOARD -D_USE_CMU_CAMERA -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa- -nw=2066
Executing: "C:\mcc18\bin\mcc18.exe" -p=18F8520 "user_SerialDrv.c" -fo="user_SerialDrv.o" /i"C:\mcc18\h" -D_FRC_BOARD -D_USE_CMU_CAMERA -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa- -nw=2066
C:\robo-code\alpha\user_SerialDrv.c:30: unable to locate 'stdio.h'
error 1 spawning C:\mcc18\bin\cpp18
Halting build on first failure as requested.
BUILD FAILED: Mon Feb 07 14:32:47 2005

I've set my paths correctly, I'm running v6.62 of MPLAB.

Tom Bottiglieri
07-02-2005, 14:55
Do you have the newest version of the compiler (2.4) installed?

phrontist
07-02-2005, 15:00
Do you have the newest version of the compiler (2.4) installed?

Ah, that could be it. I'll check back after trying that.

UPDATE: How do I get it?

GAT-X105 STRIKE
09-02-2005, 19:10
It should be on the FIRST website somewhere, or that MPLAB website, but the FTP is down now...

Greg Ross
09-02-2005, 19:59
Do you have the newest version of the compiler (2.4) installed?
Ah, that could be it.
I don't think stdio.h was included with the 2.2 compiler, so that might be it.

There are other possibilities too, though: Make sure you have C:\MCC18\h listed in the Include Path $(INCDIR) on the "General" tab of the Build Options dialog. (Modify as need if you installed the compiler other than in c:\mcc18.) Also make sure your code has #include <stdio.h>, and not #include "stdio.h". Otherwise the preprocessor will only look for the file in the current directory, and not in $(INCDIR).