[SOLVED]get a linux terminal compilation command to work with Qt
-
wrote on 15 Oct 2014, 19:58 last edited by
hi,
i have a file that i want to compile using Qt , because i want to use the debugger .
i compile the file using :
@
g++ ./hello-world.cpppkg-config --libs --cflags gegl-0.2
-o hello-world
@The output of [quote] pkg-config --libs --cflags gegl-0.2 [/quote] is:
@
-pthread -I/usr/include/gegl-0.2 -I/usr/include/babl-0.1 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wl,--export-dynamic -pthread -lgegl-0.2 -lgmodule-2.0 -lgio-2.0 -lbabl-0.1 -lm -lgobject-2.0 -lglib-2.0
@How can i configure Qt to get it to compile the above ?
I tried in the .pro file to add :
@
QMAKE_CXXFLAGS +=pkg-config --libs --cflags gegl-0.2
@
didn't work . -
wrote on 15 Oct 2014, 20:53 last edited by
if you have a good reason and need to add custom other libraries then you should check the following:
@CONFIG += link_pkgconfig
PKGCONFIG += ADD YOUR LIBRARIES HERE
//did you add link_pkgconfig before using it?@
if you need to specify exactly where location of those libs are use:
@LIBS += ADD YOUR LOCATIONS HERE
//also you can use INCLUDEPATH@if not! why don't you use the default debug variables like the ones you already get with QMAKE_CXXFLAGS_DEBUG ?
Why not mention what went wrong like error etc? -
wrote on 16 Oct 2014, 05:13 last edited by
sorry for not posting the erro .
but this is the solution (thank you echostorm) :@
QMAKE_CXXFLAGS +=
pkg-config --libs --cflags gegl-0.2
LIBS += -pthread -pthread -lgegl-0.2 -lgmodule-2.0 -lgio-2.0 -lbabl-0.1 -lm -lgobject-2.0 -lglib-2.0
INCLUDEPATH += -I/usr/include/gegl-0.2 -I/usr/include/babl-0.1 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
@ -
wrote on 16 Oct 2014, 05:24 last edited by
3afwan, your most welcome.
1/4