[cfe-dev] Using qmake and LibTooling

Jens Weller JensWeller at gmx.de
Tue Aug 14 09:45:18 PDT 2012


Hi,

SOLVED! Still some linker issues left, but I know that I have to link to a few more libraries.

Actually, llvm/Support/DataTypes.h is the WRONG one.

New qmake file:
SOURCES += main.cpp

DEFINES += __STDC_LIMIT_MACROS __STDC_CONSTANT_MACROS __STDC_LIMIT_MACROS _GNU_SOURCE

INCLUDEPATH += C:/cpp/boost_1_49_0
INCLUDEPATH += C:/cpp/llvm/mybuild/include
INCLUDEPATH += C:/cpp/llvm/tools/clang/include
INCLUDEPATH += C:/cpp/llvm/include
INCLUDEPATH += C:/cpp/llvm/mybuild/tools/clang/include

LIBS += C:/cpp/llvm/mybuild/lib/libclangTooling.a

Note, that the llvm include from the cmake build comes first, this replaces the DataTypes.h of the regular one. Then, this setup should acutally work, Qt is linked under the same mingw compiler.
mybuild contains a cmake build of llvm with "cmake -G "MinGW Makefiles" C:\cpp\llvm"

Now, I have to think which tool to build first ;)

kind regards,

Jens Weller



More information about the cfe-dev mailing list