Opened 17 years ago

Closed 13 years ago

#568 closed Bugs (invalid)

VS2005 Compilation Error

Reported by: salqadri Owned by: david_abrahams
Milestone: Component: python USE GITHUB
Version: Boost 1.38.0 Severity: Problem
Keywords: Cc: d.c.ddcc@…

Description

Python Compilation Error on VS2005:

boost\python\data_members.hpp(277) : error 
C2665: 'boost::python::detail::make_getter' : none of 
the 3 overloads could convert all the argument types

Change History (7)

comment:1 by david_abrahams, 17 years ago

Status: assignedclosed
Logged In: YES 
user_id=52572

Unless you can show a testcase that reproduces the problem,
there's not much I can do about it.  Please feel free to
reopen this if you can find a testcase.

comment:2 by nobody, 16 years ago

Logged In: NO 

I can recreat this though you would have to debug a commercial product to decide if its Python or Firaxis. 

You can recreate by getting the Civ4 SDK from firaxis:
http://www.firaxis.com/downloads/Patch/CvGameCoreDLL_v161.zip

Dont worry you dont need the game to get the error.

Now the thing compiles fine in a VS2003 compiler.  But the community is unable to get it to compile in a VS2005 compiler and it stumples on a python line.

The key block is:
#  if !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) && !BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
template <class D>
inline object make_getter(D const& d)
{
    detail::not_specified policy;
    return detail::make_getter(d, policy, is_member_pointer<D>(), 0L);
}
#  endif

The compiler wont evaluate that call it returs the error indicated in this.

And youll note the <=1300 so the block doesnt even exist to vs2003 compilers.  I actually initially tried to just force my way around the bloock by not letting the #if evaluate as true just to see.  Of course such a hamfisted attempt didnt work.

The SDK uses an older version of boost so I then replaced the version used for project level includes and libs to be the new version of boost.  STill get the error there.

The next step is to evaluate if a particular firaxis SDK specific call is inducing the trouble.  

But anyway if you want to recreate it.  Thats easy.  Go get the SDK and build in VS2005.  To my knowledge nobody has done so without an error in python.



comment:3 by david_abrahams, 16 years ago

Logged In: YES 
user_id=52572
Originator: NO

Thanks.  Practically speaking, unless you can produce a reduced test case (should be pretty easy), it will be hard for me to try to address this anytime soon, though.

comment:4 by anonymous, 14 years ago

Resolution: Works For Me
Severity: Showstopper
Status: closedreopened

This is still a problem with VS2008. I believe the faulty line is:

python::class_<CvBonusClassInfo, python::bases<CvInfoBase> >("CvBonusClassInfo")

.def_readwrite("getUniqueRange", &CvBonusClassInfo::getUniqueRange) ;

The compiler returns:

Boost-1.32.0\include\boost/python/data_members.hpp(277) : error C2665: 'boost::python::detail::make_getter' : none of the 3 overloads could convert all the argument types

Boost-1.32.0\include\boost/python/data_members.hpp(180): could be 'boost::python::api::object boost::python::detail::make_getter(D (&ϝZ& Boost-1.32.0\include\boost/python/data_members.hpp(196): or 'boost::python::api::object boost::python::detail::make_getter(D (&ϝZ& Boost-1.32.0\include\boost/python/data_members.hpp(204): or 'boost::python::api::object boost::python::detail::make_getter(D &,P &,boost::mpl::false_,...)' with [

D=int (thiscall CvBonusClassInfo::* )(void) const, P=boost::python::detail::not_specified

] while trying to match the argument list '(int (thiscall CvBonusClassInfo::* const )(void) const, boost::python::detail::not_specified, boost::is_member_pointer, long)' with [

T=int (thiscall CvBonusClassInfo::* )(void) const

] Boost-1.32.0\include\boost/python/class.hpp(447) : see reference to function template instantiation 'boost::python::api::object boost::python::make_getter(const D &)' being compiled with [

D=int (thiscall CvBonusClassInfo::* )(void) const

] Boost-1.32.0\include\boost/python/class.hpp(288) : see reference to function template instantiation 'boost::python::class_ &boost::python::class_::def_readwrite_impl(const char *,D &)' being compiled with [

W=CvBonusClassInfo, X1=boost::python::bases, D=int (thiscall CvBonusClassInfo::* )(void) const

] .\CyInfoInterface2.cpp(303) : see reference to function template instantiation 'boost::python::class_ &boost::python::class_::def_readwrite(const char *,const D &)' being compiled with [

W=CvBonusClassInfo, X1=boost::python::bases, D=int (thiscall CvBonusClassInfo::* )(void) const

]

comment:5 by anonymous, 14 years ago

Severity: ShowstopperProblem
Version: NoneBoost 1.38.0

This is still a problem in Boost 1.38.0.

comment:6 by anonymous, 14 years ago

Cc: d.c.ddcc@… added

comment:7 by troy d. straszheim, 13 years ago

Resolution: invalid
Status: reopenedclosed

I think you're going to have better luck pushing on firaxis about this than us. This isn't a testcase. A testcase is a test that I can add to libs/python/test. We're talking about one source file... see the other tests in that directory for examples.

At first, the test fails. Then I fix the bug. Then the test passes. Then I check in the test and fix, and mark the bug as fixed. Feel free to reopen if you can supply a test case.

Note: See TracTickets for help on using tickets.