strange error with ts module [closed]

asked 2015-03-30 20:04:43 -0500

theodore gravatar image

Hi guys, I am trying to use the ts module in order to apply some google unit tests on some functions. However, when I include the opencv2/ts.hpp header I am getting the following strange error:

image description

any hint? Do I miss something? I could not figure out what the problem might be.

I am with the v3.0.0 beta from the master branch.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by theodore
close date 2015-03-31 20:19:19.332897

Comments

cvconfig.h is autogenerated from cmake. it is not in one of the usual include folders, but in the main opencv src dir, so you probably have to adjust your include path to that.

berak gravatar imageberak ( 2015-03-31 02:05:23 -0500 )edit

@berak I did not get clearly what you mean by "so you probably have to adjust your include path to that". Can you be more specific ;-)

theodore gravatar imagetheodore ( 2015-03-31 06:43:17 -0500 )edit

like : g++ -I /path/to/opencv/src

berak gravatar imageberak ( 2015-03-31 06:58:35 -0500 )edit

thanks @berak I got it now, though I find it a bit awkward as a solution it worked. However, now I get the following errors:

/usr/bin/ld: /usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../lib/libopencv_ts.a(ts_gtest.cpp.o): undefined reference to symbol 'pthread_key_delete@@GLIBC_2.2.5'
/usr/lib/libpthread.so.0: error adding symbols: DSO missing from command line
Makefile:261: recipe for target 'meshGrid' failed
collect2: error: ld returned 1 exit status
make: *** [meshGrid] Error 1
14:32:37: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project meshGrid (kit: Qt 5.4.0 (System))
When executing step "Make"

any idea to that?

theodore gravatar imagetheodore ( 2015-03-31 07:50:13 -0500 )edit

ok problem solved by adding "-l pthread" to the included libs path, thanks for the help though ;-)

theodore gravatar imagetheodore ( 2015-03-31 08:08:13 -0500 )edit