The problem is PyOpenCV is only compatible with the release versions of
OpenCV (i.e. 2.0, 2.1.0) and not the current version in the repository. There
are so many changes going on in OpenCV's repository and I can't find enough
time to follow them. That's why you have received many compilation errors.
Cheers,
Minh-Tri
On 7/19/2010 2:18 AM, Rekveld wrote:
> Hi all,
>
> I'm sorry to bother you with this, but I've been trying to build
> pyopencv on Ubuntu 10.04 64bit for some hours now, and I don't
> understand what's wrong. I followed all the steps from the Wiki, all
> very clear and no problems there (except that if I use the most recent
> OpenCv from the repository, it seems that there is no
> BUILD_SWIG_PYTHON_SUPPORT anymore, but now I'm trying with a less
> recent version 2.1.0).
>
> When i do 'python setup.py build' however, all starts fine, it builds
> a couple of libraries in the bin.v2 directory in my Boost_1_43_0-
> directory, but as soon as it really starts compiling pyopencvext, I
> get myriads of errors like these below and none of the libs actually
> get built.
> What is going wrong ?
>
> kind regards,
>
> Joost.
>
>
> here a snippet of the errors I get (I get multiple pages of these per
> second during the whole compilation, most of it are complaints about
> classes being redefined):
>
>
> pyopencv/pyopencvext/sdopencv/sdcv.hpp:894: error: redefinition of
> �class cv::StereoBM�
> /usr/local/include/opencv2/calib3d/calib3d.hpp:650: error: previous
> definition of �class cv::StereoBM�
> pyopencv/pyopencvext/sdopencv/sdcv.hpp:912: error: redefinition of
> �class cv::StereoSGBM�
> /usr/local/include/opencv2/calib3d/calib3d.hpp:675: error: previous
> definition of �class cv::StereoSGBM�
> pyopencv/pyopencvext/sdopencv/sdcv.hpp:951: error: default argument
> given for parameter 5 of �void cv::validateDisparity(cv::Mat&, const
> cv::Mat&, int, int, int)�
> /usr/local/include/opencv2/calib3d/calib3d.hpp:718: error: after
> previous specification in �void cv::validateDisparity(cv::Mat&, const
> cv::Mat&, int, int, int)�
> pyopencv/pyopencvext/sdopencv/sdcv.hpp:955: error: default argument
> given for parameter 4 of �void cv::reprojectImageTo3D(const cv::Mat&,
> cv::Mat&, const cv::Mat&, bool)�
> /usr/local/include/opencv2/calib3d/calib3d.hpp:723: error: after
> previous specification in �void cv::reprojectImageTo3D(const cv::Mat&,
> cv::Mat&, const cv::Mat&, bool)�
> pyopencv/pyopencvext/sdopencv/sdcv.hpp:957: error: redefinition of
> �class cv::KeyPoint�
> /usr/local/include/opencv2/features2d/features2d.hpp:209: error:
> previous definition of �class cv::KeyPoint�
> pyopencv/pyopencvext/sdopencv/sdcv.hpp:981: error: redefinition of
> �class cv::SURF�
> /usr/local/include/opencv2/features2d/features2d.hpp:332: error:
> previous definition of �class cv::SURF�
> pyopencv/pyopencvext/sdopencv/sdcv.hpp:998: error: redefinition of
> �class cv::MSER�
> /usr/local/include/opencv2/features2d/features2d.hpp:362: error:
> previous definition of �class cv::MSER�
> pyopencv/pyopencvext/sdopencv/sdcv.hpp:1010: error: redefinition of
> �class cv::StarDetector�
> /usr/local/include/opencv2/features2d/features2d.hpp:381: error:
> previous definition of �class cv::StarDetector�
> pyopencv/pyopencvext/sdopencv/sdcv.hpp:1026: error: redefinition of
> �class CvLevMarq�
> /usr/local/include/opencv2/calib3d/calib3d.hpp:390: error: previous
> definition of �class CvLevMarq�
> pyopencv/pyopencvext/sdopencv/sdcv.hpp:1065: error: redefinition of
> �struct lsh_hash�
> /usr/local/include/opencv2/imgproc/imgproc.hpp:839: error: previous
> definition of �struct lsh_hash�
> pyopencv/pyopencvext/sdopencv/sdcv.hpp:1069: error: redefinition of
> �struct CvLSHOperations�
> /usr/local/include/opencv2/imgproc/imgproc.hpp:844: error: previous
> definition of �struct CvLSHOperations�
>
> "g++" -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -
> Wall -O3 -fPIC -Wno-strict-aliasing -I/usr/local/include/opencv -I/
> home/joost/OpenCV/boost_1_43_0 -Ipyopencv -Ipyopencv/pyopencvext -
> Ipyopencv/pyopencvext/numpy_include -Ipyopencv/pyopencvext/core -
> Ipyopencv/pyopencvext/sdopencv -DBOOST_PYTHON_STATIC_LIB -DNDEBUG -
> I"/home/joost/OpenCV/boost_1_43_0" -I"/usr/include/python2.6" -c -o
> "bin/gcc-4.4.3/release/link-static/pyopencv/pyopencvext/
> pyopencvext_free_functions_gete.pypp.o" "pyopencv/pyopencvext/
> pyopencvext_free_functions_gete.pypp.cpp"
>
> ...failed gcc.compile.c++ bin/gcc-4.4.3/release/link-static/pyopencv/
> pyopencvext/pyopencvext_free_functions_gete.pypp.o...
>
--
Dr. Minh-Tri Pham
Research Fellow, University of Surrey, UK
Email: t.p...@surrey.ac.uk or pmt...@gmail.com
Mob: +44 (0) 778 774 1089 | Tel: +44 (0) 148 368 4711
Cheers,
Minh-Tri
>>> �class cv::SURF�
>>> /usr/local/include/opencv2/features2d/features2d.hpp:332: error:
>>> previous definition of �class cv::SURF�
>>> pyopencv/pyopencvext/sdopencv/sdcv.hpp:998: error: redefinition of
>>> �class cv::MSER�
>>> /usr/local/include/opencv2/features2d/features2d.hpp:362: error:
>>> previous definition of �class cv::MSER�
>>> pyopencv/pyopencvext/sdopencv/sdcv.hpp:1010: error: redefinition of
>>> �class cv::StarDetector�
>>> /usr/local/include/opencv2/features2d/features2d.hpp:381: error:
>>> previous definition of �class cv::StarDetector�
>>> pyopencv/pyopencvext/sdopencv/sdcv.hpp:1026: error: redefinition of
>>> �class CvLevMarq�
>>> /usr/local/include/opencv2/calib3d/calib3d.hpp:390: error: previous
>>> definition of �class CvLevMarq�
>>> pyopencv/pyopencvext/sdopencv/sdcv.hpp:1065: error: redefinition of
>>> �struct lsh_hash�
>>> /usr/local/include/opencv2/imgproc/imgproc.hpp:839: error: previous
>>> definition of �struct lsh_hash�
>>> pyopencv/pyopencvext/sdopencv/sdcv.hpp:1069: error: redefinition of
>>> �struct CvLSHOperations�
>>> /usr/local/include/opencv2/imgproc/imgproc.hpp:844: error: previous
>>> definition of �struct CvLSHOperations�
Email: t.p...@surrey.ac.uk or pmt...@gmail.com