[cfe-dev] some questions about index.h

Zhe Chen mr.zhechen at gmail.com
Sun Mar 18 06:17:21 PDT 2012


>
> On Mar 15, 2012, at 7:12 PM, Zhe Chen <mr.zhechen at gmail.com> wrote:
>
>>> On Mar 15, 2012, at 9:18 AM, Zhe Chen <mr.zhechen at gmail.com> wrote:
>>>
>>> Dear collegues,
>>>     I have some questions about index.h in clang-c.
>>> 1. why CINDEX_LINKAGE is defined? what is its role?
>>>
>>>
>>> This is needed for the library to build correctly on Windows.
>>>
>>> 2. Does somebody have a complete simple example to show the use of
>>> index.h in your own program?
>>>
>>>
>>> The c-index-test program is a good example of how the APIs can be used.
>>
>> what is the relationship between clang/include/clang-c/index.h and
>> clang/tools/libclang ?
>
> Index.h is the exported libclang API.  It is named that way because libclang was originally intended as a library for doing source code indexing.
>
>> just declaration and implementation?
>
> That's it.
>
>

If I want to modify  c-index-test.c, how can I recompile it without
compiling the entire llvm/clang?
Or a similar question, if I want to create a new test file as
c-index-test.c, how can I compile it?

Zhe




More information about the cfe-dev mailing list