[cfe-dev] clang_parseTranslationUnit_Impl() problem
Michael Lehn
michael.lehn at uni-ulm.de
Sun Aug 19 14:59:02 PDT 2012
Am 19.08.2012 um 23:11 schrieb don hinton:
> On Aug 19, 2012, at 15:21, don hinton <don.hinton at gmx.com> wrote:
>
>> On Aug 19, 2012, at 15:00, don hinton <don.hinton at gmx.com> wrote:
>>
>>> 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.
Michael
More information about the cfe-dev
mailing list