Eric Fausett
|
"public.h" or similarly named header file in project results in errors compiling
|
Eric Fausett
03/10/2010 7:01 AM
post49151
|
"public.h" or similarly named header file in project results in errors compiling
I suspect the root issue has to do with a possible name collision somewhere inside the QNX recursive make system, but
would like to find out for sure.
Using the 4.6 IDE if I create a 'QNX C Project' and add a header file named public.h (or even public1.h) and include
this header in say main.c, errors are seen during compile:
---
C:\QNX641\host\win32\x86\usr\bin\make -k all --file=C:/DOCUME~1/efausett/LOCALS~1/Temp/QMakefile126822197273414112.tmp
C:/QNX641/host/win32/x86/usr/bin/make -j 1 -Cx86 -fMakefile all
make[1]: Entering directory `C:/ws46/test/x86'
C:/QNX641/host/win32/x86/usr/bin/make -j 1 -Co -fMakefile all
make[2]: Entering directory `C:/ws46/test/x86/o'
C:/QNX641/host/win32/x86/usr/bin/qcc -Vgcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -O -DNDEBUG -I. -IC:/
ws46/test/x86/o -IC:/ws46/test/x86 -IC:/ws46/test -IC:/ws46/test/public1.h -IC:/QNX641/target/qnx6/usr/include -
DBUILDENV_qss C:/ws46/test/test.c
cc1: error: C:/ws46/test/public1.h: not a directory
cc: C:/QNX641/host/win32/x86/usr/lib/gcc/i386-pc-nto-qnx6.4.0/4.3.3/cc1 caught signal 1
make[2]: *** [test.o] Error 1
make[2]: Target `all' not remade because of errors.
make[2]: Leaving directory `C:/ws46/test/x86/o'
make[1]: [all] Error 2 (ignored)
C:/QNX641/host/win32/x86/usr/bin/make -j 1 -Co-g -fMakefile all
make[2]: Entering directory `C:/ws46/test/x86/o-g'
C:/QNX641/host/win32/x86/usr/bin/qcc -Vgcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -I. -IC:/ws46/test/x86
/o -IC:/ws46/test/x86/o-g -IC:/ws46/test/x86 -IC:/ws46/test -IC:/ws46/test/public1.h -IC:/QNX641/target/qnx6/usr/include
-g -DVARIANT_g -DBUILDENV_qss C:/ws46/test/test.c
cc1: error: C:/ws46/test/public1.h: not a directory
cc: C:/QNX641/host/win32/x86/usr/lib/gcc/i386-pc-nto-qnx6.4.0/4.3.3/cc1 caught signal 1
make[2]: Leaving directory `C:/ws46/test/x86/o-g'
make[2]: *** [test.o] Error 1
make[2]: Target `all' not remade because of errors.
make[1]: [all] Error 2 (ignored)
make[1]: Leaving directory `C:/ws46/test/x86'
---
This seems to be due to the extra "-IC:/ws46/test/public1.h" that is part of the qcc command generated by make. I've
verified that the same problem occurs from a command line build of the same project.
Note that a file like "mypublic1.h" does NOT generate this error, while "public1.h" does.
- Can someone tell my why this is occuring?
- Is there any work around besides NOT starting the name of any header file with the special keyword 'public'?
Regards,
Eric
|
|
|