I am trying to use MinGW to compile a C program under Windows XP. Gcc.exe produces the following error:
stdio.h: no such file or directory
The code (hello.c) looks like this:
#include < stdio.h > void main() { printf("\nHello World\n"); }
I am using a batch file to call gcc. The batch file is as follows:
@echo off set OLDPATH=%PATH% set path=C:\devtools\MinGW\bin;%PATH% set LIBRARY_PATH=C:\devtools\MinGW\lib set C_INCLUDE_PATH=C:\devtools\MinGW\include gcc.exe hello.c set path=%OLDPATH%
I tried the -I option with no effect. What am I doing wrong?
c compiler-construction
Benno richters
source share