When you need to compile a Python extension, you'll need to know which version of Visual C++ to use.
First, find out the compiler version for the version of Python you're looking to use the extension with.
On the command line, simply execute python
Sample output:
Python 3.4.0 (v3.4.0:04f714765c13, Mar 16 2014, 19:25:23) [MSC v.1600 64 b D64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
If it does not list the Python version you're going to add the extension to, switch to the version you need.
Then take note of the MSC value. Find it in the table below and there you have the Visual C++ version you need.
Compiler version | Visual C++ version |
---|---|
MSC v.1000 | Visual C++ 4.x |
MSC v.1100 | Visual C++ 5 |
MSC v.1200 | Visual C++ 6 |
MSC v.1300 | Visual C++ .NET |
MSC v.1310 | Visual C++ .NET 2003 |
MSC v.1400 | Visual C++ 2005 |
MSC v.1500 | Visual C++ 2008 |
MSC v.1600 | Visual C++ 2010 |
MSC v.1700 | Visual C++ 2012 |
MSC v.1800 | Visual C++ 2013 |