Static building undefined reference in Linux
Hello. I built Opencv in Windows/Mac os as static library. It was easy. But in Linux I can't do it! How I build library: 1) Run graphic CMake and uncheck all modules except Core/ImgProc/Gighgui. Also Unchecked shared_library. 2) Do make and make install
In my .pro file in Qt creator there're lines like this there:
LIBS += -L/usr/local/lib/ \
-lopencv_core \
-lopencv_imgproc \
-lopencv_highgui \
-llibjpeg \
-lpng
And as I see it's being used at compliling:
g++ ... -L/usr/local/lib/ -lopencv_core -lopencv_imgproc -lopencv_highgui -llibjpeg -lpng ...
But i got errors like this:
imgwarp.cpp:-1: error: undefined reference to `cv::ParallelLoopBody::~ParallelLoopBody()' color.cpp:-1: error: undefined reference to `cv::parallel_for_(cv::Range const&, cv::ParallelLoopBody const&, double)'
There're errors inside Img proc library. What's wrong?
UPD: I checked building as shared library and everything's ok. There's problem only with static build