【发布时间】:2016-03-08 20:16:05
【问题描述】:
有什么想法我在这里做错了吗?
输入:
pi@raspberrypi ~/DisplayImage $ g++ DisplayImage.o -o DisplayImage `pkg-config --cflags opencv` `pkg-config --libs opencv`
输出:
/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
【问题讨论】:
-
您应该检查两个 pkg-config 命令的输出,看看它们是否有意义。
标签: c++ opencv g++ raspberry-pi