I want to use a C++ library from Python

Anders Eriksson andis59 at gmail.com
Thu Sep 11 02:16:03 EDT 2008


Hello all and thanks for replying,


> Diez B. Roggisch wrote:
>> Which actually isn't really helpful, as a DLL itself says nothing about what
>> language was used to create it - and sending the OP to e.g. ctypes makes no
>> sense at all in the face of C++.
> 
> The library - or more precisely the calling convention of the library - 
> is related to the solution. On Windows a dll might be a container for a 
> .NET assembly and C++ code can (theoretically) be compiled to .NET, too.
> 
No, the library is not an .NET assembly. It's an VC++ Library compiled as
an Dll.

>> Whereas the first link for "python c++" is Boost::Python, a C++-wrapper to
>> make C++-code accessible from Python.
> 
> C++ bindings can be created with SIP, SWIG, Boost or hand written code. 
> Multiple sites claim that SIP generates the fastest code.
> 
I have looked (very briefly) at the three framework you mention but they
all need the source code of the C++?

I don't have the source code! Just the header files and the library and
dll.

Have I overlooked something or am I just screwed?

// Anders
-- 
English is not my first, or second, language
so anything strange, or insulting, is due to
the translation.
Please correct me so I may improve my English!



More information about the Python-list mailing list