[C++-sig] How to import a boost::python dll in windows?
Roman Yakovenko
roman.yakovenko at gmail.com
Wed Feb 14 13:38:50 CET 2007
On 2/14/07, ichijoji <ichijoji at gmail.com> wrote:
>
> I'm trying to port some research code that uses boost::python to expose a
> library to python to windows, but I'm having trouble importing the dll into
> python. I'm compiling using msvc 2005 and using python 2.5, but when I try
> to import the module I get this:
>
> Traceback (most recent call last):
> File "main.py", line 1, in <module>
> import object
> File "c:\code\sge\code\scripts\object.py", line 1, in <module>
> import sge
> ImportError: No module named sge
>
> My module is named sge and I'm compiling to sge.dll. Is there some obvious
> reason why python wouldn't be able to find my dll? When I compile on linux
> into an so this code works fine.
You are using Python2.5. In this version of Python you have to have
file extension
to be "pyd" - sge.pyd
--
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
More information about the Cplusplus-sig
mailing list