user573014
user573014

Reputation: 725

how to add multiple external libraries to Qt creator .pro (ubuntu)

I want to add two external libraries to my qt application and I tried this :

LIBS += -L/usr/local/lib \
-lopencv_core \
-lopencv_imgproc \
-lopencv_highgui \
-lopencv_ml \
-lopencv_video \
-lopencv_features2d \
-lopencv_calib3d \
-lopencv_objdetect \
-lopencv_contrib \
-lopencv_legacy \
-lopencv_flann

LIBS += -L/opt/intel/composer_xe_2011_sp1.9.293/ipp/lib/intel64 \

-lpthread \
-lippcv \
-lstdc++ \
-lippvc \
-liomp5 \
-lippac \
-lipps \
-lippsc \
-lippi \
-lipps \
-lippm \
-lippr \
-lippj \
-lippvm \
-lippcor

and it gave me that error :

Parse Error ('-lippvc -liomp5 -lippac -lipps -lippsc -lippi -lipps -lippm -lippr -lippj -lippvm -lippcor')

I look at some example online but most of them do it for one library only, or do it with window which is quite different ..

thank you

Upvotes: 3

Views: 3871

Answers (2)

user573014
user573014

Reputation: 725

This worked with me :

 LIBS += -L/usr/local/lib -L/opt/intel/composer_xe_2011_sp1.9.293/ipp/lib/intel64
-lopencv_core \
-lopencv_imgproc \
-lopencv_highgui \
-lopencv_ml \
-lopencv_video \
-lopencv_features2d \
-lopencv_calib3d \
-lopencv_objdetect \
-lopencv_contrib \
-lopencv_legacy \
-lopencv_flann
-lpthread \
-lippcv \
-lstdc++ \
-lippvc \
-liomp5 \
-lippac \
-lipps \
-lippsc \
-lippi \
-lipps \
-lippm \
-lippr \
-lippj \
-lippvm \
-lippcor

Upvotes: 2

Chris Browet
Chris Browet

Reputation: 4266

Remove the blank line (or add a "\") between the second "LIBS" and "lpthread \".

Credits to @neciu

Upvotes: 1

Related Questions