[cfe-dev] linking error when running libTooling tutorial

Kristóf Umann via cfe-dev cfe-dev at lists.llvm.org
Mon Oct 22 08:22:29 PDT 2018


Thanks!

On 22 Oct 2018 17:18, "Lou Wynn" <lewisurn at gmail.com> wrote:

> This is what I used:
>
> cmake -GNinja  ../llvm-project/llvm -DLLVM_ENABLE_PROJECTS="clang;libcxx;libcxxabi"
> -DLLVM_OPTIMIZED_TABLEGEN=true -DCMAKE_BUILD_TYPE=Debug
> -DCMAKE_C_COMPILER=clang-6.0 -DCMAKE_CXX_COMPILER=clang++-6.0
> -DLLVM_USE_LINKER=lld-6.0 -DLLVM_TARGETS_TO_BUILD="X86"
> -DBUILD_SHARED_LIBS=ON
>
>
> Love,
> Lou
>
>
> On 10/22/18 11:14 PM, Kristóf Umann wrote:
>
> Actually, how did you configure cmake? I experienced similar linker errors
> when building other external projects, and I suspect it might be down to
> using a different setup.
>
> On 22 Oct 2018 14:19, "Kristóf Umann" <dkszelethus at gmail.com> wrote:
>
>> Cheers, glad it's solved!
>> Lou Wynn <lewisurn at gmail.com> ezt írta (időpont: 2018. okt. 22., H,
>> 14:16):
>>
>>> Nice, adding clangFrontend works! The tutorial needs an update.
>>>
>> Yup, let's do it then. ;)
>>
>>> Thanks.
>>>
>>> Love,
>>> Lou
>>>
>>> On 10/22/18 8:06 PM, Kristóf Umann wrote:
>>>
>>> Shouldn't it be this?:
>>> set(LLVM_LINK_COMPONENTS Support)
>>>
>>> add_clang_executable(loop-convert
>>>   LoopConvert.cpp
>>>   )
>>> target_link_libraries(loop-convert
>>>   PRIVATE
>>>   clangFrontend
>>>   clangTooling
>>>   clangBasic
>>>   clangASTMatchers
>>>   )
>>>
>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20181022/ca51cc4b/attachment.html>


More information about the cfe-dev mailing list