This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author lemburg
Recipients aheider, cgohlke, christian.heimes, jdetaeye, koen, lemburg, loewis, mhammond, ntouran, zhirsch
Date 2009-10-29.12:16:29
SpamBayes Score 2.35488e-11
Marked as misclassified No
Message-id <>
In-reply-to <>
Christoph Gohlke wrote:
> Christoph Gohlke <> added the comment:
> Apparently the msvc9compiler_stripruntimes_regexp2 patch causes problems
> for MinGW users. The following C program is using the Python C API to
> import the testpyd extension generated by When compiled with
> MinGW, the program fails with "ImportError: DLL load failed:..." if the
> PYD extension is compiled with MSVC9 and the patch is applied. The
> program works if 1) it is compiled with MSVC9, or 2) the testpyd
> extension is build without the patch, or 3) the files
> Microsoft.VC90.CRT.manifest and msvcr90.dll are placed next to the
> executable and the manifest is also embedded into the executable (e.g.
> using mt.exe).
> /* Import the testpyd.pyd module. */
> #include <Python.h>
> int main(void) {
>     Py_Initialize();
>     { 
>         PyObject *p = PyImport_ImportModule("testpyd"); 
>     }
>     Py_Finalize();
>     return 0;
> }

I'm not sure whether this is related to the problem in question.
Does MinGW also embed a manifest in the generated executable ?

If it doesn't, then this is more likely a problem with how
MinGW works per default, than with Python or distutils.

The fact that the above does work without the patch applied
suggests that MinGW does not embed the manifest in the executable
(since the Windows linker then uses the one from the PYD file).
Date User Action Args
2009-10-29 12:16:32lemburgsetrecipients: + lemburg, loewis, mhammond, christian.heimes, koen, aheider, zhirsch, jdetaeye, cgohlke, ntouran
2009-10-29 12:16:30lemburglinkissue4120 messages
2009-10-29 12:16:29lemburgcreate