[cfe-dev] Using qmake and LibTooling

"C. Bergström" cbergstrom at pathscale.com
Tue Aug 14 07:39:45 PDT 2012


On 08/14/12 09:38 PM, Jens Weller wrote:
> Hi,
>
> trying to setup my dev env under Windows, one of my goals is to use Qt as a Frontend for my tools.
> And QtCreator as an IDE for the whole thing. I could get cmake to build with the mingw supplied by Qt, also I could build the cbp Version with cmake, so I can open LLVM in CodeBlocks or QtCreator. Its even compiling.
>
> So actually, I'm ready to start, my first goal is to this running with qmake. Just to have a start to work from. So, I've searched the list and the net, and have not found anything on this. So, I thought, its maybe a good Idea to ask on the list. Has someone else got this running with QMake under Windows with QtCreator?
>
>
> So actually, I'm ready to start, my first goal is to build the PrintFunctionName Example with qmake. But it seems not to be enough to hand the include directories and the libraries to qmake to make it compile. Some minor issues I could resolve, but I'm stuck on this:
>
> DataTypes.h:
> /* Handle incorrect definition of uint64_t as u_int64_t */
> #ifndef HAVE_UINT64_T
> #ifdef HAVE_U_INT64_T
> typedef u_int64_t uint64_t;
> #else
> # error "Don't have a definition for uint64_t on this platform"//
> #endif
> #endif
>
> This fails always, I have a stdint.h which defines uint64_t, but in this case, the header fails to detect this. Tried already to define HAVE_UINT_64_T etc.
> Now, note, that I can build for exact compiler with cmake and qmake should not be so different. My current qmake file:
>
> #DEFINES += HAVE_STDINT_H
>
> #INCLUDEPATH += C:/qt/2010.03/mingw/include // doesnt need it, just a try
> INCLUDEPATH += C:/cpp/boost_1_49_0  //for boost/cstdint.hpp
> INCLUDEPATH += C:/cpp/llvm/tools/clang/include
> INCLUDEPATH += C:/cpp/llvm/include
>
> // linker yet not invoked, may some missing here, but I know which...
> LIBS += C:/cpp/llvm/mybuild/lib/libclangTooling.a
>
> // when using not boost/cstdint need to define them here
> DEFINES += __STDC_LIMIT_MACROS __STDC_CONSTANT_MACROS __STDC_LIMIT_MACROS _GNU_SOURCE
>
> Has someone expierence with getting this setup to run?
> How is CMake setting the environment up? I've read through the generated makefiles, but could not find any difference which explains this.
> The other 535 Errors I think are probably also from some config/setup problems.
I'm pretty sure this is a QtC related question - Someone here may know, 
but if you don't get a response try there.




More information about the cfe-dev mailing list