Ask Your Question
0

Run a C++ code that was programmed for OpenCV 2.0 with OpenCV 2.4.9

asked 2016-02-17 23:53:30 -0500

Hi,

I have installed OpenCV 2.4.9 in Ubuntu 14.04 LTS. I want to run a C++ code that was programmed for OpenCV 2.0 with OpenCV 2.4.9. Is that possible? or do I have to install OpenCV 2.0?

I tried but I got the following errors:

g++ -I/usr/local/include   -Wall -O2 -c common.cpp
g++ -shared -lcv -lcxcore -lhighgui -lm  grid_map.o hough.o io.o  manipulatemap.o common.o -o libmapmerge.so
/usr/bin/ld: cannot find -lcv
/usr/bin/ld: cannot find -lcxcore
/usr/bin/ld: cannot find -lhighgui
/usr/bin/ld: grid_map.o: relocation R_X86_64_32S against `_ZTVSt9basic_iosIcSt11char_traitsIcEE' can not be used when making a shared object; recompile with -fPIC
grid_map.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make: *** [libmapmerge.so] Error 1

Best,

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-02-18 01:17:09 -0500

berak gravatar image

those libraries do no more exist, please instead link against -lopencv_core -lopencv_imgproc -lopencv_highgui

(and report back, if something is still missing)

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-02-17 23:53:30 -0500

Seen: 107 times

Last updated: Feb 18 '16