Ask Your Question
1

undefined reference to cv::softdouble::operator/

asked 2018-03-06 09:18:44 -0600

JohnB gravatar image

Hei !

I have build opencv 3.4 with openblas, lapack, ipp, tbb and avx support on ubuntu x64. At the end, I take the .a files (both opencv_* and 3rd parties) to put them in a special folder for my project. My project only needs core, videoio, highgui, imgproc and imgcodecs modules of opencv. I precise that my project already works with opencv 3.2 (linux and windows). I'm now trying to update it to 3.4 with the supports mentioned above. Nevertheless, when I build it, I get several "undefined reference to" about cv::softdouble/float operators, cv::cbrt, cvRound, cvTrunc, mulAdd and pow. I don't have those issues on windows.

The doc mentions that those functions are in core module so I don't understand why they are not found. Do you know what are the missing dependencies ?

Thanks!

edit retag flag offensive close merge delete

Comments

I have the same issue

ceztko gravatar imageceztko ( 2018-05-07 10:20:47 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2018-05-07 15:31:26 -0600

ceztko gravatar image

updated 2018-05-07 15:32:25 -0600

I had exactly the same issue. Also I have similar setup with few modules needed. You don't say but you are probably using modules compiled as static libraries. The problem is about ordering of libraries, with must be given correctly in gcc compiler. In my case I was preparing this variable to feed to target_link_libaries() directive in cmake:

set(OpenCV_LIBS
    libopencv_core.a
    libopencv_imgcodecs.a
    libopencv_imgproc.a
)

Code didn't work until I changed the order of libraries to this:

set(OpenCV_LIBS
    libopencv_imgcodecs.a
    libopencv_imgproc.a
    libopencv_core.a         // <--- Put core last
)

This is needed just in gcc, msvc is free from these issues. More info about the problem here.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2018-03-06 09:18:44 -0600

Seen: 4,293 times

Last updated: May 07 '18