现在的位置: 首页 > 综合 > 正文

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

2013年06月08日 ⁄ 综合 ⁄ 共 608字 ⁄ 字号 评论关闭

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

  1. using std::ptrdiff_t;
     

抱歉!评论已关闭.