clang_parseTranslationUnit_Impl() problem

Hi:

clang_parseTranslationUnit_Impl() passes the results of CIndexer::getClangResourcesPath() to ASTUnit::LoadFromCommandLine(), causing it to override HeaderSearchOpts::ResourceDir which means it can no longer find things like <string>.

Anyone else experiencing this?

take care...
don

Hi:

clang_parseTranslationUnit_Impl() passes the results of CIndexer::getClangResourcesPath() to ASTUnit::LoadFromCommandLine(), causing it to override HeaderSearchOpts::ResourceDir which means it can no longer find things like <string>.

Anyone else experiencing this?

That doesn't seem to be the problem, but it still can't find includes like <string>. btw, I'm passing the arguments from Compile.CXX in the make system.

thanks...
don

Hi:

clang_parseTranslationUnit_Impl() passes the results of CIndexer::getClangResourcesPath() to ASTUnit::LoadFromCommandLine(), causing it to override HeaderSearchOpts::ResourceDir which means it can no longer find things like <string>.

Anyone else experiencing this?

That doesn't seem to be the problem, but it still can't find includes like <string>. btw, I'm passing the arguments from Compile.CXX in the make system.

Turns out it's only a problem when processing .h files. So, when using libclang, how can I force it to use c++ instead of c?

thanks...
don

You can pass the option '-x c++' to the compiler.

Michael

Hi:

clang_parseTranslationUnit_Impl() passes the results of CIndexer::getClangResourcesPath() to ASTUnit::LoadFromCommandLine(), causing it to override HeaderSearchOpts::ResourceDir which means it can no longer find things like <string>.

Anyone else experiencing this?

That doesn't seem to be the problem, but it still can't find includes like <string>. btw, I'm passing the arguments from Compile.CXX in the make system.

Turns out it's only a problem when processing .h files. So, when using libclang, how can I force it to use c++ instead of c?

You can pass the option '-x c++' to the compiler.

Thanks. Found that after I sent message... Too bad it doesn't respect the emacs mode statement.

I'm trying to write up my doc tool in the llvm/clang make system, so I guess I can hard code it for now and add a flag later.

thanks again...
don