OPENCV 测试Mat
来源:互联网 发布:excel每隔几行取数据 编辑:程序博客网 时间:2024/06/05 07:33
如果直接写 g++ -o test test.cpp 这样会出错。
错误提示如下:
Mat_test.cpp:(.text._ZN2cv3MatD2Ev[_ZN2cv3MatD5Ev]+0x2b): undefined reference to `cv::fastFree(void*)'
/tmp/ccudVHxi.o: In function `cv::Mat::create(int, int, int)':
Mat_test.cpp:(.text._ZN2cv3Mat6createEiii[cv::Mat::create(int, int, int)]+0x81): undefined reference to `cv::Mat::create(int, int const*, int)'
/tmp/ccudVHxi.o: In function `cv::Mat::release()':
Mat_test.cpp:(.text._ZN2cv3Mat7releaseEv[cv::Mat::release()]+0x3b): undefined reference to `cv::Mat::deallocate()'
collect2: ld returned 1 exit status
但是如下就不会错了。。。。
2down vote
add the library path
export LD_LIBRARY_PATH=$LD_LIBARARY_PATH:/usr/local/lib
then use the command
g++ -o sample sample.cpp `pkg-config --cflags --libs opencv`
或者这样:
It looks like the pkg-config
program is assuming that the library path for opencv
libs
in in the default path, and it is not.
try adding the -L
option to the gcc
line. (-L{path to opencv libs}
)
- OPENCV 测试Mat
- OpenCV Mat
- opencv-Mat
- Mat--opencv
- opencv---mat
- opencv Mat
- opencv mat
- OpenCV Mat
- opencv-mat
- opencv MAT
- opencv-Mat
- OpenCV: Mat
- OpenCV-----Mat
- opencv mat
- C++读写matlab的mat文件 结合opencv Mat结构测试
- 【opencv】 opencv之Mat详解
- 【opencv】opencv之Mat属性
- opencv入门(Mat)
- OGRE Review of 2014
- 图像处理之 YUYV422 To OpenCV IplImage
- poj 2559(单调栈)
- 2015_1_15调研总结
- 实例讲解SQL注入攻击 http://www.csdn.net/article/2015-01-13/2823533-SQL?reload=1 作者zer0Black
- OPENCV 测试Mat
- 不使用第三方变量来交换两个变量的值
- Error与Exception有什么区别?
- mysql 有可能的优化方式
- The Miner - Flash项目性能测试器
- Ogre3D based “NeoAxis” game engine now free
- centos高清分辨率
- 驰名商标遭陷害, GBF重赏千万抓“鬼”
- http服务