I am trying to build an application (AVRDude 5.6) in Cygwin. I have downloaded a minimal number of packages and have sucessfully run the configure script but on building I encounter some errors:

make  all-recursive
make[1]: Entering directory `/cygdrive/c/avrdude'
Making all in windows
make[2]: Entering directory `/cygdrive/c/avrdude/windows'
if gcc -DHAVE_CONFIG_H -I. -I. -I..     -g -O2 -mno-cygwin -DWIN32NATIVE -MT loa
ddrv.o -MD -MP -MF ".deps/loaddrv.Tpo" -c -o loaddrv.o loaddrv.c; \
        then mv -f ".deps/loaddrv.Tpo" ".deps/loaddrv.Po"; else rm -f ".deps/loa
ddrv.Tpo"; exit 1; fi
In file included from /usr/lib/gcc/../../include/w32api/windef.h:253,
                 from /usr/lib/gcc/../../include/w32api/windows.h:48,
                 from loaddrv.c:9:
/usr/lib/gcc/../../include/w32api/winnt.h:37:20: string.h: No such file or direc
In file included from /usr/lib/gcc/../../include/w32api/ole2.h:9,
                 from /usr/lib/gcc/../../include/w32api/windows.h:114,
                 from loaddrv.c:9:
/usr/lib/gcc/../../include/w32api/objbase.h:12:20: stdlib.h: No such file or dir
loaddrv.c:10:19: stdio.h: No such file or directory
loaddrv.c:13:20: unistd.h: No such file or directory
Which lead to undeclared identifier errors etc.

I've searched around and in all cases it seems to be that the standard header files are missing - but they aren't - im looking at stdlib.h right now in my /usr/include folder!

I've added the folder to the PATH environment variable but it doesnt help.

I tried to link the string.h file from usr/include to the gcc include folder, and re-run make, which resulted in this:

/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/string.h:22: error: parse error before
/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/string.h:22: error: parse error before
 '(' token
/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/string.h:23: error: parse error before
 '(' token
..and on and on.

So now I am very confused...

One thing though, when I linked string.h after I recieved an error sys/string.h not found, of course in /usr/include there is a sys folder containing string.h so I am thinking that gcc is completely ignoring my /usr/include but I have no idea why?

Any ideas?


BTW, in the cmd output it shows all the files it can find as being in /usr/lib/gcc...../]file.ext], however, gcc is installed in [cygwin root]/lib/gcc/.....

Where has the initial /usr/ directory come from?