2015-12-04 43 views
0

任何想法我在这里做错了吗?未能用g ++编译opencv程序

输入:

[email protected] ~/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 '[email protected]@GLIBC_2.4' 
//lib/arm-linux-gnueabihf/libpthread.so.0: error adding symbols: DSO missing from command line 
collect2: ld returned 1 exit status 
+0

您应该检查这两个pkg配置的输出命令来查看它们是否有意义。 – Bull

回答