gcc 4.6.2 cannot find include header

Pan ruochen panruochen@gmail.com
Wed Mar 20 04:13:00 GMT 2013


Hi All,

I get compilation errors in the following case:
a. Current directory is TopDir
b. gcc tries to compile some source file in sub directory SubDir
c. the source file includes a header file in TopDir
d. -I./ flag is set

gcc still reports: fatal error: xxx.h: No such file or directory

My gcc version information is as followed:
Using built-in specs.
COLLECT_GCC=C:\MinGW\bin\gcc.exe
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.6.2/lto-wrapper.exe
Target: mingw32
Configured with: ../gcc-4.6.2/configure
--enable-languages=c,c++,ada,fortran,objc,obj-c++
--disable-sjlj-exceptions --with-dwarf2 --enable-shared
--enable-libgomp --disable-win32-registry --enable-libstdcxx-debug
--enable-version-specific-runtime-libs --build=mingw32 --prefix=/mingw
Thread model: win32
gcc version 4.6.2 (GCC)

The error cannot be seen in any older version. The sample source and
makefile is attached.

BR, Ruochen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc-4.6.2-bug.tar.bz2
Type: application/x-bzip2
Size: 401 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/20130320/5461a69c/attachment.bz2>


More information about the Gcc-bugs mailing list