Reputation: 2315
I am trying to learn Qt, I have file test.cpp
that I run via the terminal using the following command:
g++ `pkg-config --cflags --libs libsbml` test.cpp -L /usr/local/lib -lsbml -lstdc++ -lm
How can I suppl the same options to Qt?
Thank you.
Upvotes: 4
Views: 319
Reputation: 53215
You could write the qmake snippet below. In short, you would need to take a look at the following qmake variables:
PKGCONFIG
TEMPLATE = app
TARGET = test
INCLUDEPATH += .
LIBS += -L /usr/local/lib -lsbml -lstdc++ -lm
unix {
CONFIG += link_pkgconfig
PKGCONFIG += libsbml
}
HEADERS += test.h
SOURCES += test.cpp
Upvotes: 3
Reputation: 2315
In .pro file add:
LIBS += -L /usr/local/lib -lsbml -lstdc++ -lm
look at the Makefile to figure out what variables are used. The makefile is in the build folder made by Qt.
Upvotes: 1