11-27-2012 01:04 AM
Hi all,
I want to include OpenCV 2.2 library into my cascades project. I included following piece of code in .pro file:
LIBS += D:/OpenCV2.2/lib/*
INCLUDEPATH += ../src
INCLUDEPATH += D:/OpenCV2.2/include
INCLUDEPATH += D:/OpenCV2.2/include/opencv
When I build the project it doesn't produce any error. But when I try to include classes in the project it produces error:
#include <opencv/cv.h>
#include <opencv/cxcore.h>
#include <opencv/highgui.h>
Any kind of help will be highly appreciated.
Regards,
Nishant Shah
01-02-2013 02:28 AM - edited 01-02-2013 02:30 AM
As I see you need to do following steps:
1) add to your *.pro file relative path to libs after "-L", extract shared lib names from files names (for example, libPocoFoundation.so.15 becomes PocoFoundation) and add after "-l"
2) add relative path to includes
3) you can also try absolute path )
LIBS += -L../../POCO/lib -lPocoFoundation -lPocoNet -lPocoUtil -lPocoXML
INCLUDEPATH += ../../POCO/include
3) put your shared libs to some dir in assets and update LD_LIBRARY_PATH in bar-descriptor.xml (I create dir "lib" in assets dir)
was <env var="LD_LIBRARY_PATH" value="app/native/lib:/usr/lib/qt4/lib"/>
now <env var="LD_LIBRARY_PATH" value="app/native/assets/lib:app/native/lib:/usr/l