[cfe-dev] Hi, everyone, fail on building c-index-test
Douglas Gregor
dgregor at apple.com
Thu Oct 1 10:50:34 PDT 2009
On Oct 1, 2009, at 6:36 AM, 罗勇刚(Yonggang Luo) wrote:
> At the first glance, it's coming with that c-index-test is just
> only containing c files (without cpp(cxx,c++) files).
>
> So cmake recognize it as pure C project,
> and so it's link options that resident in link.txt is
> /usr/bin/gcc CMakeFiles/c-index-test.dir/c-index-test.c.o -
> o ../../../../bin/c-index-test -rdynamic ../../../../lib/
> libCIndex.so ../../../../lib/libclangIndex.a ../../../../lib/
> libclangFrontend.a ../../../../lib/libclangSema.a ../../../../lib/
> libclangAST.a ../../../../lib/libclangLex.a ../../../../lib/
> libclangBasic.a ../../../../lib/libLLVMBitReader.a ../../../../lib/
> libLLVMMC.a ../../../../lib/libLLVMCore.a ../../../../lib/
> libLLVMSupport.a ../../../../lib/libLLVMSystem.a -ldl -lpthread -Wl,-
> rpath,/home/dreamkxd/llvm/lib
>
> And so, it's won't linkage with C++ library. So it's failure to
> compiling the c-index-test project
>
> Is there any solution to this problem?
You're building using CMake? Try modifying tools/CIndex/CMakeLists.txt
by adding the following command at the end:
set_target_properties(CIndex
PROPERTIES
LINKER_LANGUAGE CXX)
If that works for you, please tell me so I can commit the change to svn.
- Doug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20091001/163b39b9/attachment.html>
More information about the cfe-dev
mailing list