> Dear All,
>
> I have a makefile that produces the following output:
>
> ---------------------------------------------------------
>
> g++ -O3 -pipe -DNDEBUG -pedantic-errors -Wimplicit -Wparentheses
> -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings
> -Wconversion -Wno-unknown-pragmas
> `PKG_CONFIG_PATH=/home/psmith/Desktop/Ipopt-3.9.2/lib/pkgconfig:
> /usr/bin/pkg-config --cflags ipopt`  -c -o cpp_example.o
> cpp_example.cpp
> g++ -O3 -pipe -DNDEBUG -pedantic-errors -Wimplicit -Wparentheses
> -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings
> -Wconversion -Wno-unknown-pragmas
> `PKG_CONFIG_PATH=/home/psmith/Desktop/Ipopt-3.9.2/lib/pkgconfig:
> /usr/bin/pkg-config --cflags ipopt`  -c -o MyNLP.o MyNLP.cpp
> bla=;\
> for file in cpp_example.o MyNLP.o; do bla="$bla `echo $file`"; done; \
> g++ -Wl,--rpath -Wl,/home/psmith/Desktop/Ipopt-3.9.2/lib/coin
> -Wl,--rpath -Wl,/home/psmith/Desktop/Ipopt-3.9.2/lib/coin/ThirdParty
> -O3 -pipe -DNDEBUG -pedantic-errors -Wimplicit -Wparentheses
> -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings
> -Wconversion -Wno-unknown-pragmas   -o cpp_example $bla
> `PKG_CONFIG_PATH=/home/psmith/Desktop/Ipopt-3.9.2/lib/pkgconfig:
> /usr/bin/pkg-config --libs ipopt`
>

Generally pkgconfig files for installed libs are found here
(/usr/lib/pkgconfig).

In your pro file you can add:

CONFIG += link_pkconfig
PKGCONFIG += ipopt

The name that comes after PKGCONFIG is the same as found in
/usr/lib/pkgconfig without the .pc suffix.

as for any definitions that you need:

DEFINES += YOURDEF ...

and for the flags

CFLAGS += -Wall ...


by using CONFIG values of debug / release you can control optimizations
for the binary.  e.g. -O0 and -O2

A good starting point could be
http://doc.qt.nokia.com/latest/qmake-project-files.html

Br,
Brian

_______________________________________________
Qt-creator mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt-creator

Reply via email to