opencv2.0 源码安装 for x86 make出现error: 'ptrdiff_t' does not name a type 解决

来源:互联网 发布:手机连接电脑 软件 编辑:程序博客网 时间:2024/04/26 12:08

make的时候出现error: 'ptrdiff_t' does not name a type造成编译错误,具体原因是没有加一个命名空间。具体可以见:http://web.archiveorange.com/archive/v/b6fbFdu0fh9uQC9aVdpF,只要在cxcore.hpp的命名空间地方加入include目录下的cxcore.hpp(一定看准名字,可不是src目录下)的位置在要根据你编译的时候出现的错误的位置来确定。):

参考文章:http://blog.csdn.net/timebomb/article/details/6973634



pc版本x86下opencv的配置为:
./configure --without-gtk --without-carbon --without-quicktime --without-1394libs --without-ffmpeg --without-python --without-swig --enable-static --enable-shared --disable-apps CXX=g++ --with-v4l2 --prefix=/usr/x86/opencv --libdir=/usr/x86/opencv/lib -includedir=/usr/x86/opencv/include

[cpp] view plaincopy
  1. using std::ptrdiff_t;  
原创粉丝点击