[cfe-dev] libclang cannot find its resource dir on linux?
Erik Verbruggen
erik.verbruggen at me.com
Tue Jan 7 06:59:47 PST 2014
Hi,
I have a small test program that behaves differently on linux and mac:
CXIndex idx = clang_createIndex(1, 1);
struct CXUnsavedFile unsaved[1];
unsaved[0].Filename = "tst.c";
unsaved[0].Contents = "#include <xmmintrin.h>\n";
unsaved[0].Length = strlen(unsaved[0].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?
-- Erik.
More information about the cfe-dev
mailing list