From: Reinhard N. <rei...@pr...> - 2003-01-29 08:14:25
|
Reinhard Nadrchal wrote: > Hi all, > > I'm porting Python extensions (using the CXX API) from unix *.so files > to DLLs using MinGW. My problem is that although compilation and linking > works fine, the Python interpreter complains when importing the DLLs > (i.e. it crashes). Is there something special about Windows DLLs I have > to take into account. > > By the way, a second question. Can I simply compile my static unix > libraries int *.lib files and link them? > > reinhard > > > > ------------------------------------------------------- > This SF.NET email is sponsored by: > SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! > http://www.vasoftware.com > _______________________________________________ > MinGW-users mailing list > Min...@li... > > You may change your MinGW Account Options or unsubscribe at: > https://lists.sourceforge.net/lists/listinfo/mingw-users > I don't make any progress with the hints provided so for, so let me state the problem differently: As I've explained previously we have to port python extension modules (making heavy use of STL) from Unix/Linux to Windows. I guess the MinGW linker links stdc++ code statically (using libstdc++.a). To avoid resource conflicts we linked a dynamic version (libstdc++.so) on Unix platforms. If we try the same under Windows (namly producing a libstdc++.dll by converting the libstdc++ using ar and dllwrap) and making the python extension module (as a DLL file), one of two things happens: either the python interpreter complains if our libstdc++.dll is not in the path, or it crashes if we naivly make it available to python. 1. Can you think of some (maybe obvious) reason for this? 2. How to use a dynamic version of libstdc++ (usage of __declspec(dllexport) for libstc++) 3. How to make use of *.def files produced with dllwrap? 4. Is it necessary to dynamically link libstdc++ under Windows in order to avoid conflicts (e.g. opening I/O channels) Sorry for getting on your nerves and thanks in advance, reinhard |