tmolomby / pyodbc

Automatically exported from code.google.com/p/pyodbc
MIT No Attribution
0 stars 0 forks source link

How to compile pyodbc with msvc10 compiler in x86 system? #260

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.I have installed visual studio 2010.
2.I have source code of pyodbc-3.0.3.
3.In the visual studio command prompt,
  a. run > %comsepc% /k "C:\Program Files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86
  b. python setup.py build
4.It said: "error: Unable to find vcvarsall.bat".

Original issue reported on code.google.com by YadongWa...@gmail.com on 9 May 2012 at 8:55

GoogleCodeExporter commented 9 years ago
This error occurs because distutils is looking Visual Studio 2008.

Building a Python extension on Windows requires that you have the same C 
compiler that was used to build Python.  The Windows binaries from python.org 
for Python 2.6+ are built with Visual Studio 2008.

If you want to use Visual Studio 2010 then you need to build Python yourself 
from source code.  There are some notes on how to do this here:
http://wiki.python.org/moin/VS2010

Note that this would mean you must also build from source every other library 
that you use which contains C extensions.

Original comment by lukedell...@gmail.com on 21 May 2012 at 2:02

GoogleCodeExporter commented 9 years ago
As mentioned, you must use the same version of Visual Studio that Python was 
built with.

Original comment by mkleehammer on 23 Jun 2012 at 9:32