[C++-sig] Problem with vc++ 7

Paul F. Kunz Paul_Kunz at SLAC.Stanford.EDU
Fri Nov 22 01:31:51 CET 2002


>>>>> On Tue, 19 Nov 2002 12:00:20 -0500, David Abrahams <dave at boost-consulting.com> said:

> "Paul F. Kunz" <Paul_Kunz at SLAC.Stanford.EDU> writes:
>> Environment: boost 1.28.0, VC++ 7.0, Windows 2000 and XP.
>> 
>> My Python extension module fails to intialize.  From the function
>> generated by the macro
>> 
>> BOOST_PYTHON_MODULE_INIT(hippo)
>> 
>> the assertion in BOOST_FUNCTION_FUNCTION::operator()
>> 
>> assert(!this->empty());
>> 
>> fails.  With same source code, I do not have the problem with gcc
>> 2.95.3 with boost 1.25.0 or gcc 3.2 with boost 1.28.0 under RedHat
>> Linux.  Also didn't have the problem with VC++ 6.0 sp 5.
>> 
>> Any clues?  Known problem?

> Sorry, nope.

> I can only suggest an upgrade to a current Boost.Python v2. It's
> much better tested than 1.28.0.


   Found the problem!   Only took two afternoon's worth of work :-(

The project setting for the vc.proj that created the Python extension
module was set "Use Managed Extension" = "yes".   Setting it to "no"
completely fixes the problem.   Grrr.   I guess the "yes" setting was
a default.




More information about the Cplusplus-sig mailing list