I'm having a strange problem compiling with VS 2013. It's not finding a header file that's there in one of the header file search dirs. Here's the compile command (with the names changed to protect the innocent ;-) 1> C:\Program Files (x86)\LLVM\msbuild-bin\CL.exe /c /IC:\[top-level-dir]\[source-dir]\ /IC:\[top-level-dir]\[source-dir]\[sub-dir-1] /IC:\[top-level-dir]\[source-dir]\[sub-dir-2] /IC:\[top-level-dir]\[dest-dir]\[dest-sub-dir]\include /IC:\[SDK-dir]\[SDK-source-dir]\[SDK-sub-dir]\include /IC:\[SDK-dir]\[SDK-source-dir]\[SDK-sub-dir]\include\[include-sub-dir] /Zi /nologo /W3 /WX- /Od /D WIN32 /D _DEBUG /D _WINDOWS /D _USRDLL /D [elided] /D _t_env_os_WIN32 /D [also-elided] /D _SCL_SECURE_NO_WARNINGS /D _CRT_SECURE_NO_WARNINGS /D OBJC_OLD_DISPATCH_PROTOTYPES=1 /D _WIN64 /D "__x86_64__= 1" /D _WINDLL /D _UNICODE /D UNICODE /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"Debug\x64\\" /Fd"Debug\x64\vc120.pdb" /Gd /TP /wd4068 /wd4200 /wd4244 /wd4267 /wd4305 /wd4309 /wd4311 /wd4800 /FIC:\[top-level-dir]\[source-dir]\\[prefix-header].h /errorReport:prompt -m64 -fmsc-version=1800 -ferror-limit=1000 -m64 -fmsc-version=1800 [source-file].cpp And here's the error: 1> In file included from [source-file].cpp:9: 1> In file included from C:\[top-level-dir]\[source-dir]/[source-file].h:12: 1>C:\[top-level-dir]\[source-dir]/[another-header-file].h(14,10): fatal error : '[UPPER-CASE-NAME].h' file not found 1> #include "[UPPER-CASE-NAME].h" [UPPER-CASE-NAME].h is in C:\[top-level-dir]\[source-dir]\[sub-dir-1]\ (I wonder a bit about the forward slash in the third error line, but I assume it's just how the error message is formatted) Does anyone have any idea what 's going on here. The header file is clearly in one of the directories on the list of search directories, and yet the compiler is saying it can't find it. Regards, Eric Mader
I don't know if this makes any difference, but it's the only thing I can think of - "C:\[top-level-dir]\[source-dir]\[sub-dir-1]" is actually 38 characters long. (counting the "C:\") Is it possible that this is getting truncated by the preprocessor? It does appear whole in the build log, FWIW. Regards, Eric On 10/1/14, 3:03 PM, Eric Mader wrote:> I'm having a strange problem compiling with VS 2013. It's not finding > a header file that's there in one of the header file search dirs. > > Here's the compile command (with the names changed to protect the > innocent ;-) > > 1> C:\Program Files (x86)\LLVM\msbuild-bin\CL.exe /c > /IC:\[top-level-dir]\[source-dir]\ > /IC:\[top-level-dir]\[source-dir]\[sub-dir-1] > /IC:\[top-level-dir]\[source-dir]\[sub-dir-2] > /IC:\[top-level-dir]\[dest-dir]\[dest-sub-dir]\include > /IC:\[SDK-dir]\[SDK-source-dir]\[SDK-sub-dir]\include > /IC:\[SDK-dir]\[SDK-source-dir]\[SDK-sub-dir]\include\[include-sub-dir] /Zi > /nologo /W3 /WX- /Od /D WIN32 /D _DEBUG /D _WINDOWS /D _USRDLL /D > [elided] /D _t_env_os_WIN32 /D [also-elided] /D > _SCL_SECURE_NO_WARNINGS /D _CRT_SECURE_NO_WARNINGS /D > OBJC_OLD_DISPATCH_PROTOTYPES=1 /D _WIN64 /D "__x86_64__= 1" /D _WINDLL > /D _UNICODE /D UNICODE /Gm- /EHsc /RTC1 /MDd /GS /fp:precise > /Zc:wchar_t /Zc:forScope /Fo"Debug\x64\\" /Fd"Debug\x64\vc120.pdb" /Gd > /TP /wd4068 /wd4200 /wd4244 /wd4267 /wd4305 /wd4309 /wd4311 /wd4800 > /FIC:\[top-level-dir]\[source-dir]\\[prefix-header].h > /errorReport:prompt -m64 -fmsc-version=1800 -ferror-limit=1000 -m64 > -fmsc-version=1800 [source-file].cpp > > And here's the error: > > 1> In file included from [source-file].cpp:9: > 1> In file included from > C:\[top-level-dir]\[source-dir]/[source-file].h:12: > 1>C:\[top-level-dir]\[source-dir]/[another-header-file].h(14,10): > fatal error : '[UPPER-CASE-NAME].h' file not found > 1> #include "[UPPER-CASE-NAME].h" > > [UPPER-CASE-NAME].h is in C:\[top-level-dir]\[source-dir]\[sub-dir-1]\ > > (I wonder a bit about the forward slash in the third error line, but I > assume it's just how the error message is formatted) > > Does anyone have any idea what 's going on here. The header file is > clearly in one of the directories on the list of search directories, > and yet the compiler is saying it can't find it. > > Regards, > Eric Mader > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >
I just tried moving my code to a new location so that the path name of the directory containing the problematic header file is only 21 characters and the file is still not being found, so I guess it's not a path length problem... Regards, Eric On 10/2/14, 11:28 AM, Eric Mader wrote:> I don't know if this makes any difference, but it's the only thing I > can think of - "C:\[top-level-dir]\[source-dir]\[sub-dir-1]" is > actually 38 characters long. (counting the "C:\") Is it possible that > this is getting truncated by the preprocessor? It does appear whole in > the build log, FWIW. > > Regards, > Eric > > On 10/1/14, 3:03 PM, Eric Mader wrote: >> I'm having a strange problem compiling with VS 2013. It's not finding >> a header file that's there in one of the header file search dirs. >> >> Here's the compile command (with the names changed to protect the >> innocent ;-) >> >> 1> C:\Program Files (x86)\LLVM\msbuild-bin\CL.exe /c >> /IC:\[top-level-dir]\[source-dir]\ >> /IC:\[top-level-dir]\[source-dir]\[sub-dir-1] >> /IC:\[top-level-dir]\[source-dir]\[sub-dir-2] >> /IC:\[top-level-dir]\[dest-dir]\[dest-sub-dir]\include >> /IC:\[SDK-dir]\[SDK-source-dir]\[SDK-sub-dir]\include >> /IC:\[SDK-dir]\[SDK-source-dir]\[SDK-sub-dir]\include\[include-sub-dir] >> /Zi /nologo /W3 /WX- /Od /D WIN32 /D _DEBUG /D _WINDOWS /D _USRDLL /D >> [elided] /D _t_env_os_WIN32 /D [also-elided] /D >> _SCL_SECURE_NO_WARNINGS /D _CRT_SECURE_NO_WARNINGS /D >> OBJC_OLD_DISPATCH_PROTOTYPES=1 /D _WIN64 /D "__x86_64__= 1" /D >> _WINDLL /D _UNICODE /D UNICODE /Gm- /EHsc /RTC1 /MDd /GS /fp:precise >> /Zc:wchar_t /Zc:forScope /Fo"Debug\x64\\" /Fd"Debug\x64\vc120.pdb" >> /Gd /TP /wd4068 /wd4200 /wd4244 /wd4267 /wd4305 /wd4309 /wd4311 >> /wd4800 /FIC:\[top-level-dir]\[source-dir]\\[prefix-header].h >> /errorReport:prompt -m64 -fmsc-version=1800 -ferror-limit=1000 -m64 >> -fmsc-version=1800 [source-file].cpp >> >> And here's the error: >> >> 1> In file included from [source-file].cpp:9: >> 1> In file included from >> C:\[top-level-dir]\[source-dir]/[source-file].h:12: >> 1>C:\[top-level-dir]\[source-dir]/[another-header-file].h(14,10): >> fatal error : '[UPPER-CASE-NAME].h' file not found >> 1> #include "[UPPER-CASE-NAME].h" >> >> [UPPER-CASE-NAME].h is in C:\[top-level-dir]\[source-dir]\[sub-dir-1]\ >> >> (I wonder a bit about the forward slash in the third error line, but >> I assume it's just how the error message is formatted) >> >> Does anyone have any idea what 's going on here. The header file is >> clearly in one of the directories on the list of search directories, >> and yet the compiler is saying it can't find it. >> >> Regards, >> Eric Mader >> >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >> > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >