[LLVMdev] Hi, everyone, fail on building c-index-test
罗勇刚(Yonggang Luo)
luoyonggang at gmail.com
Mon Oct 5 15:17:59 PDT 2009
Is there anyone get the time to apply this patch?
2009/10/2, Douglas Gregor <dgregor at apple.com>:
>
> 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
--
从我的移动设备发送
此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo
More information about the llvm-dev
mailing list