[C++-sig] Re: Extension DLLs nonfunctioning with MSVC 7.1 (beta)

Raoul Gough RaoulGough at yahoo.co.uk
Wed Nov 26 23:16:58 CET 2003


Christophe Pradal <christophe.pradal at cirad.fr> writes:

> i work with Python2.3,  Visual C++ SP5, STLPort .
>
> i have my own shared_pointer ( RefCountPtr )and want to use it with boost.
> If i add an assignement operator with implicit cast:
> template<class U> RefCountPtr( const RefCountPtr<U>&ptr ) {...}
> i have the following message
>
> ImportError: DLL load failed: Invalid access to memory location.
>
> But when i comment this line, all is OK.

Weird. I've tracked down my problem, but I'm not sure it would explain
what you've described here. In my case, it looks like I generated at
some stage a different version of python22.lib for use with g++. I
have to admit that I don't recall why I did this, except that the
standard one probably didn't work with GNU ld for some reason. Anyway,
the link command for MSVC was also picking up this .lib file (after
I'd long since forgotten replacing it) and generating an invalid
boost_python.dll which was crashing during __DllMainCRTStartup or
__CRT_INIT. Kind of embarrasing, really.

-- 
Raoul Gough.
export LESS='-X'





More information about the Cplusplus-sig mailing list