First of all I assume you have seen this post which describes how to build opencv statically for Linux. If that is the case then you can just add the following code to your qmake .PRO file to use opencv with Qt.
unix: {
CONFIG += link_pkgconfig
PKGCONFIG += opencv
}
Thanks for your tutorials, they are being very helpful !
I compiled a shared library linked to static opencv and it worked. When I try to compile other project using the shared library I wrote, I get some errors on the compiler saying undefined reference to the ipp functions on the “.so ” file.
The errors are like:
../output/lib_foo.so: undefined reference to `ippicviMean_16s_C3R’
there are some other errors, all related to ipp functions. lib_foo.so is the shared library I created and I get that errors when I try to compile an application using my shared library.
Obviously it has something to do with the way you are linking. It seems to me that you are trying to link to a library that has some parts built into it statically (opencv) and some parts built shared (ipp).
I didn’t quite understand why would you want to do it like this?! I assume you are writing a library of your own that uses OpenCV, is that right? If that’s the case I’d recommend you to go for shared opencv instead of static.