[LLVMdev] LLVM+Clang as a shared library
agarny at hellix.com
Fri Dec 16 11:29:41 PST 2011
I have downloaded version 3.0 of LLVM and Clang and built them as shared
libraries (on Windows, Linux and Mac OS X) using the following steps:
tar xvzf llvm-3.0.tar.gz
tar xvzf ../../clang-3.0.tar.gz
mv clang-3.0.src clang
../llvm-3.0.src/configure --disable-docs --enable-shared
Everything is fine when I test LLVM on its own within my Qt-based
application. However, as soon as I try to test Clang (using the Clang
get linking errors. For example, undefined references to
clang::DiagnosticOptions const&, bool),
clang::DiagnosticConsumer*, bool), etc.
What I don't understand is that both LLVM and Clang are built together, yet
only LLVM works for me. Otherwise, yes, I have made sure that my Qt-based
application is built with Clang in mind. In fact, I have done exactly the
same as I have done with LLVM, hence I am really puzzled as what might be
wrong in my setup. However, one thing that I noticed is that, on Windows (at
least), the DLL I have got only contains 159 entries while LLVM contains
13,320. Surely, Clang should contain more than just 159 entries...?!
Anyway, any help I could get regarding the above would be most welcome...
More information about the llvm-dev