[C++-sig] Embedding...

David Abrahams dave at boost-consulting.com
Fri Oct 27 21:52:24 CEST 2006


Stefan Seefeld <seefeld at sympatico.ca> writes:

> Beau Sapach wrote:
>> That seems to have worked, I manually added the BOOST_PYTHON_DECL macro to
>> the 4 files and now it links just fine.  Thanks!  Strangely though, my app
>
> Great ! David, is it OK for this patch (see previous mail) to be applied to
> both, HEAD, as well as the 1_34 branch ?
>

I didn't see the previous email, but it seems inappropriate to think
about applying patches before so many mysteries (below) are cleared up.

>> can't link into the DLL at runtime unless it's in the same folder, even
>> though the DLL is on the PATH and the LD_LIBRARY_PATH.  And finally, the
>> program is breaking within the first call to import:
>> 
>> boost::python::object main = boost::python::import("__main__");
>> 
>> it breaks on:
>> 
>> python::handle<> module(python::borrowed(PyImport_AddModule(n)));
>> 
>> saying:
>> 
>> Unhandled exception at 0x1e079547 in boostapp.exe: 0xC0000005: Access
>> violation reading location 0x00000004.
>
> That's very strange. Can you run the boost.python test suite ?
> I'd strongly suspect your build system / code to be the culprit, unless
> you can prove the contrary. :-)
>
> (And yes: in order for anybody to be able to help you further a
> test case is needed, making the failure reproducible, at least to
> those who run boost on the same platform as you.)
>
> Regards,
> 		Stefan
>
>
> -- 
>
>       ...ich hab' noch einen Koffer in Berlin...
>

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com



More information about the Cplusplus-sig mailing list