some questions about index.h

Dear collegues,
     I have some questions about index.h in clang-c.
1. why CINDEX_LINKAGE is defined? what is its role?
2. Does somebody have a complete simple example to show the use of
index.h in your own program?

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.

  1. 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 ? just declaration and implementation? or something more?

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.

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

Dear collegues,
    I have some questions about index.h in clang-c.
1. If I want to modify c-index-test.c, how can I recompile it without
compiling the entire llvm/clang?
2. Or a similar question, if I want to create a new test file (similar
as c-index-test.c), how can I compile it?
Thanks!

Zhe Chen