http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56686
Bug #: 56686 Summary: gcc cannot find include header file Classification: Unclassified Product: gcc Version: 4.6.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassig...@gcc.gnu.org ReportedBy: panruoc...@gmail.com GCC fails 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.