[issue24872] Add /NODEFAULTLIB:MSVCRT to _msvccompiler

Christoph Gohlke report at bugs.python.org
Sat Aug 15 22:04:46 CEST 2015


Christoph Gohlke added the comment:

Thank you for looking into this.

I just tried '/NODEFAULTLIB:msvcrt.lib' with Pillow and matplotlib but still get the linker errors:

tiff.lib(jbig.obj) : error LNK2001: unresolved external symbol __imp_memchr

freetype.lib(ftbase.obj) : error LNK2001: unresolved external symbol __imp_strrchr
freetype.lib(truetype.obj) : error LNK2001: unresolved external symbol __imp_strstr
freetype.lib(type1.obj) : error LNK2001: unresolved external symbol __imp_memchr
freetype.lib(sfnt.obj) : error LNK2001: unresolved external symbol __imp_memchr

Looks like I'll have to rebuild all the 3rd party libraries with '/MT' and link DLLs with '/NODEFAULTLIB:libucrt.lib ucrt.lib' to remove the dependency on vcruntimeXXX.dll.

This change should probably be mentioned in the release notes.

Maybe also bring it to the attention of Ilan Schnell (ilan) and Cournapeau David (cdavid) who build packages for Anaconda and Canopy.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24872>
_______________________________________


More information about the Python-bugs-list mailing list