Boost logo

Boost :

Subject: [boost] [python] 1.41.0 importing python extensions fails
From: Okko Willeboordse (okko.willeboordse_at_[hidden])
Date: 2009-11-19 16:57:19


Using MSVC 2008 on windows server 2003, Python 2.6.2

Importing python extension modules fails.

As an example I compiled the tutorial hello world example;

char const* greet()
{
   return "hello, world";
}

#include <boost/python.hpp>

BOOST_PYTHON_MODULE(hello_ext)
{
    using namespace boost::python;
    def("greet", greet);

in to a dll named hello_ext.pyd.

When I try to import the extension I get;

>>> import hello_ext
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: DLL load failed: The specified module could not be found.

In the debugger I see that hello_ext.pyd is loaded and unloaded;

'python': Loaded 'D:\Projects\GAIUS\owillebo\temp\test\Debug\hello_ext.pyd'
'python': Unloaded
'D:\Projects\GAIUS\owillebo\temp\test\Debug\hello_ext.pyd'

Digging in to it.

Can anyone confirm this?


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk