[cfe-dev] libclang cannot find its resource dir on linux?
erik.verbruggen at me.com
Tue Jan 7 06:59:47 PST 2014
I have a small test program that behaves differently on linux and mac:
CXIndex idx = clang_createIndex(1, 1);
struct CXUnsavedFile unsaved;
unsaved.Filename = "tst.c";
unsaved.Contents = "#include <xmmintrin.h>\n";
unsaved.Length = strlen(unsaved.Contents);
CXTranslationUnit tu = clang_parseTranslationUnit(idx, "tst.c", 0, 0, unsaved, 1, 0);
On macos, the translation unit is fine: when running clang_getInclusions on it, I get the full path of xmmintrin.h. However, on linux this fails with "tst.c:1:10: fatal error: 'xmmintrin.h' file not found". Running it on the command-line works fine though.
So, is this expected behaviour, or a bug?
More information about the cfe-dev