[cfe-dev] InitHeaderSeach defaultSystemIncludePaths

moataz ragab mtzrgb at gmail.com
Fri May 1 10:11:16 PDT 2009


Hi Chris,

Sorry for the confusion, just to clarify, I am building a source transformer
based on Clang. So I am doing a small example aside to better understand the
Clang classes. (I have my own main, not using clang-cc.cpp)

As I look into clang-cc.cpp, I can see that Clang initializes the header
search paths using the relative include path.
Eventually I will rely on clang-cc.cpp and have the transformation as a
command line option.

Thanks,
Moataz


On Fri, May 1, 2009 at 6:20 PM, Chris Lattner <clattner at apple.com> wrote:

>
> On Apr 30, 2009, at 7:06 PM, moataz ragab wrote:
>
>  Hi,
>>
>> I am trying to use the initHeaderSeach and initialize it with the default
>> system include paths. On my installation, Fedora 10 the one of the system
>> include path (needed for stdef.h) is not one of the listed in the
>> initHeaderSeach. So In my code, I used the AddPath and now it works. Also on
>> different version with 64 bit fedora 9, it is on
>> /usr/lib/gcc/x86_64-redhat-linux/4.3.0/include
>>
>
> Hi Moataz,
>
> Clang includes its own stddef.h file that it should fine relative to the
> path of the executable.  Do you know why this isn't working?
>
> -Chris
>
>
>>
>> Below is a sample code:
>>
>>  InitHeaderSearch init(context.headers);
>>  init.AddDefaultSystemIncludePaths(context.opts);
>>  init.AddPath("/usr/lib/gcc/i386-redhat-linux/4.3.2/include/",
>>           (InitHeaderSearch::IncludeDirGroup) 2, true, false, false);
>>
>> Best regards,
>> Moataz
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20090501/652d017b/attachment.html>


More information about the cfe-dev mailing list