Python 2.6 and wrapping C libraries on Windows



I have read that Python extension modules must link to the same C run-time as the Python interpreter. This I can appreciate. But does this requirement extend to the C libraries an extension module wraps. The case in point is Pygame and SDL. The Pygame extension modules are built with distutils, so for Python 2.6 using Visual Studio 2008 should ensure the .pyd files link to msvcr90.dll. But SDL is built using Msys/MinGW and the configure/make tool chain. This fails when linking to msvcr90.dll since the small test programs configure builds lack manifest files. They fail to load msvcr90.dll, raising an R6034 error instead. So besides heap management and FILE pointers, is there any reason SDL, or any C dependency, needs to link to the same C run-time as Python? If I ensure SDL frees memory it allocates and does not directly access a file opened by Python can I just use another C run-time such as msvcrt?


--
Lenard Lindstrom
"%s@%s.%s" % ('len-l', 'telus', 'net')
.



Relevant Pages

  • Build of extension module depending on external lib fails on Solaris 10
    ... I've got a brand new Solaris 10 computer and I'm trying to build Python and extension modules for it. ... But I can't succeed to build extension modules depending on external libraries: The compilation works, and object files are produced, but the link always fails. ... Here is the result of the command 'python setup.py build': ...
    (comp.lang.python)
  • Re: Build of extension module depending on external lib fails on Solaris 10
    ... I've got a brand new Solaris 10 computer and I'm trying to build Python   ... and extension modules for it. ... and object files are produced, ... Here is the result of the command 'python setup.py build': ...
    (comp.lang.python)
  • Re: which windows python to use?
    ... In this case, MSVC 7., I think. ... I meant to build Python itself. ... MS toolkit or mingw and munging the dlls to conform to the MSVC 7 formats. ... Building stock-2.4 extension modules using mingw works for the most part. ...
    (comp.lang.python)
  • Re: building a linux executable
    ... installed or no packages of it? ... It's not usually the absence of Python that's the problem. ... dependencies for all the target distributions, ... So I've bundled all the extension modules (cx_Freeze helped me out ...
    (comp.lang.python)
  • embedding and extending issues (with Boost.Python)
    ... I've been trying to make Python extension modules using Boost.Python, ... Then if I rewrite f3 using Boost.Python, I still need a wrapper, say ... I suppose I don't need `foo' passed down from f1 because if I import ...
    (comp.lang.python)