PDA

View Full Version : adding gcc command line options in QT



prkhr4u
28th January 2014, 09:55
How can and where should I add gcc command line options in QtCreator?
example:

I want to run a program in QT which otherwise runs like this in terminal:

gcc basic-tutorial-1.c -o basic-tutorial-1 `pkg-config --cflags --libs gstreamer-0.10`

Where should I add the string `pkg-config --cflags --libs gstreamer-0.10` ??

anda_skoa
28th January 2014, 13:40
For exmaple In the .pro file, using the system command
http://qt-project.org/doc/qt-4.8/qmake-function-reference.html#system-command

qmake even supports pkg-config directly: http://qt-project.org/faq/answer/does_qmake_have_support_for_pkg-config

Cheers,
_

prkhr4u
29th January 2014, 03:30
Thanks for the reply.I am using pkg-config directly and have added these two lines to my .pro file:

CONFIG += link_pkgconfig
PKGCONFIG += gstreamer-0.10