tags:

views:

1774

answers:

2

Hi, Since I am very UNHAPPY with Visual Studio (It's just Junk!) I am trying to use QT creator, which seems to be the solution for my c++ projects to get easily run in my Mac also. But I am using OpenCV. So, How do I set libraries in QT? (include folder and maybe some libs)

I am trying with this app: http://www.qt-apps.org/content/show.php/Qt+Opencv+webcam+viewer?content=89995

But getting many errors since qt does not know where to find the libraries, where should I enter the paths? or something?

Help will be very well appreciated.

Ignacio

A: 

Partial Answer to myself:

See: http://doc.trolltech.com/4.5/qmake-project-files.html Declaring Other Libraries Section.

But I Will have to compile opencv as it where for linux I think... I don't think opencv.framework will work with LIBS.

Is there any variable like FRAMEWORKS?

nacho4d
I don't know if I understand correctly... To use OpenCV in your Qt application you have to compile OpenCV once and then link to the resulting library in your .pro file. No need to rebuild it each time with your application (unless you modify OpenCV itself).
esavard
Sorry, I forgot to mention that I am trying to use Opencv.framework (for Mac OS) and since frameworks are not linked with the same flag "-l" I suppose I will have to compile opencv as linux and then use it in my project.That is why I was wondering if there is a " -framework " or equivalent I can use inside .pro file.
nacho4d
+2  A: 

I think I have answered 2 Qt questions that recoup what you are asking :

The first answer is about OpenCV integration in Qt: OpenCV with other GUI (like Qt or WxWidgets) on Win32 VC++

And the second about using 3rd party libraries in Qt: How do i reference the qjson.dll file from my qt project?

esavard