Ask Your Question

lokoArt's profile - activity

2019-03-29 01:31:01 -0600 received badge  Popular Question (source)
2013-02-24 00:00:23 -0600 commented answer Static building undefined reference in Linux

Oh... Thank you... I didn't know. I'm new in Linux developing and in Linux at all)

2013-02-23 20:05:10 -0600 received badge  Scholar (source)
2013-02-23 20:05:05 -0600 received badge  Supporter (source)
2013-02-23 02:25:16 -0600 received badge  Editor (source)
2013-02-23 01:47:09 -0600 asked a question 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