Ask Your Question
0

conflict between opencv libraries

asked 2017-04-17 03:34:31 -0600

DEHANDPI gravatar image

I have the following warning and errors on Qt:

:-1: warning: libopencv_core.so.3.1, needed by //usr/local/lib/libopencv_cudafeatures2d.so, may conflict with libopencv_core.so.2.4

:-1: error: algorithmes.o: undefined reference to symbol '_ZN2cv8internal18WriteStructContextC1ERNS_11FileStorageERKNS_6StringEiS6_'

/usr/local/lib/libopencv_core.so.3.1:-1: error: error adding symbols: DSO missing from command line

:-1: error: collect2: error: ld returned 1 exit status

I imagine that the errors are due to the potential conflict mentioned in the warning. What should I do in my .pro LIBS to put the right lopencv_core library ?

edit retag flag offensive close merge delete

Comments

1

you probably should make a decision, if you want to use opencv2.4 or opencv3.1, and uninstall the other version.

berak gravatar imageberak ( 2017-04-17 03:44:37 -0600 )edit

Isn't it possible to precise the version of libs into the .pro to avoid uninstalling one version (it's a nvidia tegra card that I was lent so ...)

DEHANDPI gravatar imageDEHANDPI ( 2017-04-17 04:07:51 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2017-04-19 07:36:07 -0600

The solution is simple, just install your version to specific locations and not in the usr path, then correctly link your application in the .pro file. An example can be found here.

edit flag offensive delete link more

Comments

Thanks for your answer, I'll look at it this afternoon. Could you have a quick look at last comment? Thanks in advance (#belgian solidarity ;-) )

DEHANDPI gravatar imageDEHANDPI ( 2017-04-20 02:39:53 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2017-04-17 03:34:31 -0600

Seen: 3,152 times

Last updated: Apr 19 '17