sethrh / pyopencv

Automatically exported from code.google.com/p/pyopencv
0 stars 0 forks source link

error: address of overloaded function with no contextual type information #13

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Trying to build latest pyopencv from svn (rev 864)
2.
3.

What is the expected output? What do you see instead?

Compilation is failing for a few files with errors such as:

pyopencv/pyopencvext/Vec4w.pypp.cpp: In function ‘void 
register_Vec4w_class()’:
pyopencv/pyopencvext/Vec4w.pypp.cpp:85: error: address of overloaded 
function with no contextual type information

What version of the product are you using? On what operating system?

Revision 864 from trunk, in Ubuntu 10.04.

Please provide any additional information below.

Still searching for solutions to this problem.  Will post if I find 
anything.

Original issue reported on code.google.com by n13m3y3r on 5 May 2010 at 6:27

GoogleCodeExporter commented 9 years ago
Thanks. I can remove operator[] from class Vec4w, since it is eventually 
replaced by
numpy.ndarray's method __getitem__. Beside class Vec4w, is there any other 
class that
exhibits the same compilation error?

Cheers,
Minh-Tri

Original comment by pmtri80@gmail.com on 6 May 2010 at 8:58

GoogleCodeExporter commented 9 years ago
I found out the problem, with the helps of some folks on the ##c++ channel.

The opencv I'm using (from svn) apparently has changed the return time of 
operator[] 
in relation to the generated code in the pyopencv branch.  This is how 
operator[] 
looks like in 2.0:

template<typename _Tp, int cn> inline _Tp Vec<_Tp, cn>::operator [](int i) 
const { 
return val[i]; }
template<typename _Tp, int cn> inline _Tp& Vec<_Tp, cn>::operator[](int i) { 
return 
val[i]; }

This is how it looks like in the current svn:

template<typename _Tp, int cn> inline const _Tp& Vec<_Tp, cn>::operator [](int 
i) 
const { return val[i]; }
template<typename _Tp, int cn> inline _Tp& Vec<_Tp, cn>::operator[](int i) { 
return 
val[i]; }

There are more problems like this I believe.

I don't have time right now, but I will try to compile them from the tarballs 
to see 
how it goes later.

Original comment by n13m3y3r on 6 May 2010 at 4:38