cvs python wrapper compilation error

View: New views
2 Messages — Rating Filter:   Alert me  

cvs python wrapper compilation error

by patrick-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hi,

any idea how to fix this error when compiling opencv from cvs for linux (python
2.5 - ubuntu):

make[4]: Entering directory `/home/pat/src/opencv/interfaces/swig/python'
/bin/bash ../../../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I.
-I../../..  -I../../../cv/include -I../../../cxcore/include
-I../../../ml/include -I../../../otherlibs/highgui
-DCV_NO_BACKWARD_COMPATIBILITY -DNDEBUG  -fPIC -I/usr/include/python2.5  -MT
_cv_la-_cv.lo -MD -MP -MF .deps/_cv_la-_cv.Tpo -c -o _cv_la-_cv.lo `test -f
'_cv.cpp' || echo './'`_cv.cpp
 g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../cv/include
-I../../../cxcore/include -I../../../ml/include -I../../../otherlibs/highgui
-DCV_NO_BACKWARD_COMPATIBILITY -DNDEBUG -fPIC -I/usr/include/python2.5 -MT
_cv_la-_cv.lo -MD -MP -MF .deps/_cv_la-_cv.Tpo -c _cv.cpp  -fPIC -DPIC -o
.libs/_cv_la-_cv.o
_cv.cpp: In function 'int SWIG_Python_ConvertFunctionPtr(PyObject*, void**,
swig_type_info*)':
_cv.cpp:2051: error: invalid conversion from 'const char*' to 'char*'
_cv.cpp: In function 'void SWIG_Python_FixMethods(PyMethodDef*,
swig_const_info*, swig_type_info**, swig_type_info**)':
_cv.cpp:107187: error: invalid conversion from 'const char*' to 'char*'
make[4]: *** [_cv_la-_cv.lo] Error 1
make[4]: Leaving directory `/home/pat/src/opencv/interfaces/swig/python'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/pat/src/opencv/interfaces/swig'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/pat/src/opencv/interfaces'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/pat/src/opencv'
make: *** [all] Error 2


pat

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Opencvlibrary-devel mailing list
Opencvlibrary-devel@...
https://lists.sourceforge.net/lists/listinfo/opencvlibrary-devel

Re: cvs python wrapper compilation error

by Nils Hasler-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hi pat,

On Saturday 17 May 2008 09:06, puredata@... wrote:
> _cv.cpp: In function 'int SWIG_Python_ConvertFunctionPtr(PyObject*, void**,
> swig_type_info*)':
> _cv.cpp:2051: error: invalid conversion from 'const char*' to 'char*'
> _cv.cpp: In function 'void SWIG_Python_FixMethods(PyMethodDef*,
> swig_const_info*, swig_type_info**, swig_type_info**)':
> _cv.cpp:107187: error: invalid conversion from 'const char*' to 'char*'
> make[4]: *** [_cv_la-_cv.lo] Error 1

a guy was complaining about something like this a few days ago on IRC. i think
for him rerunning swig solved the problem.

that is you need to

./configure --with-swig

in addition to whatever other options you used. you may have to

make clean

after the configure before make runs smoothly again.

cheers,
nils

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Opencvlibrary-devel mailing list
Opencvlibrary-devel@...
https://lists.sourceforge.net/lists/listinfo/opencvlibrary-devel