[issue27324] Error when building Python extension

Mark report at bugs.python.org
Thu Jun 16 04:38:46 EDT 2016


Mark added the comment:

The problem is that I don't have the choice, the compiler we use for the project is VS13. Anyway, my colleagues are aware of this limitation but they could build their extensions all the same.

I set the variables as you recommended, and the obj files have been created. But the link fails with the following error:

LINK : fatal error LNK1181: impossible to open the input file 'ucrt.lib'

This library does not exist in my VS13 environment.

---- Message d'origine ----
De : Zachary Ware <report at bugs.python.org>
À : tibo53 at netcourrier.com
Objet : [issue27324] Error when building Python extension
Date : 15/06/2016 18:54:39 CEST

Zachary Ware added the comment:

Using the wrong compiler, you may wind up with an extension that appears to work, and you may never have a problem with it if conditions are just right. This article[1] looks like a pretty good explanation of why you don't want to do it, though (note: I've only skimmed the article).

If you really want to shoot yourself in the foot, you can try running vcvarsall.bat yourself, then make sure MSsdk is set (distutils doesn't care what it's set to, just that it's set), and set DISTUTILS_USE_SDK (again, doesn't matter to what).

Also, note that this problem should be a thing of the past with Python 3.5+ and VS2015+.

[1] http://siomsystems.com/mixing-visual-studio-versions/

----------

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

----------

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


More information about the Python-bugs-list mailing list