0

Any ideas what I'm doing wrong here?

Input:

pi@raspberrypi ~/DisplayImage $ g++ DisplayImage.o -o DisplayImage `pkg-config --cflags opencv` `pkg-config --libs opencv`

Output:

/usr/bin/ld: warning: libopencv_core.so.2.4, needed by /usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../libopencv_contrib.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libopencv_imgproc.so.2.4, needed by /usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../libopencv_contrib.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libopencv_features2d.so.2.4, needed by /usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../libopencv_contrib.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libopencv_calib3d.so.2.4, needed by /usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../libopencv_contrib.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libopencv_highgui.so.2.4, needed by /usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../libopencv_contrib.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libopencv_ml.so.2.4, needed by /usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../libopencv_contrib.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libopencv_video.so.2.4, needed by /usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../libopencv_contrib.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libopencv_objdetect.so.2.4, needed by /usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../libopencv_contrib.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: /usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../libopencv_core.a(rand.cpp.o): undefined reference to symbol 'pthread_getspecific@@GLIBC_2.4'
//lib/arm-linux-gnueabihf/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: ld returned 1 exit status
Bondolin
  • 2,793
  • 7
  • 34
  • 62
  • You should check the outputs of the two pkg-config commands to see if they make sense. – Bull Dec 04 '15 at 04:26

2 Answers2

0

This answer has the arguments the other way around.

pkg-config opencv --libs
GPPK
  • 6,546
  • 4
  • 32
  • 57
0

if you are cross compiling you may need pkg-config-arm-linux-gnueabi reading the similar post might also help Package opencv was not found in the pkg-config search path

Community
  • 1
  • 1
Jamil Farooq
  • 131
  • 2
  • 9