I am trying to install the latest version of pymssql (1.0.2) in my Windows 2003 x64. However, I am constantly getting this error:
running install
running build
running build_py
running build_ext
building '_mssql' extension
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG "-Ic:\Program Files\Microsoft SQL Server\80\Tool
s\DevTools\Include" -Ic:\mssql7\DevTools\Include -Id:\DEVEL\pymssql-DEVTOOLS\INCLUDE -Ic:\Python27\include -Ic:\Python27\PC /Tcmssqldbmodule.c /Fobuil
d\temp.win32-2.7\Release\mssqldbmodule.obj
mssqldbmodule.c
mssqldbmodule.c(50) : fatal error C1083: Cannot open include file: 'sqlfront.h': No such file or directory
error: command '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe"' failed with exit status 2
Any ideas? Isn't sqlfront.h included in the installation of visual studio 2k8 (or any visual studios)
Thank you!
I had the same problem with Visual Studio 2008, Windows 7 64 and Python 2.7 (32 bits).
These were the steps I followed to solved it:
#include <sqlfront.h>
and #include <sqldb.h>
To #include "sqlfront.h"
and #include "sqldb.h"
So the compiler will look for sqlfront.h and sqldb.h files locally. C:\\Program Files (x86)\\Microsoft Visual Studio\\VC98\\Include
(Visual Studio 6 installation) To you local directory (where setup.py is). C:\\Program Files (x86)\\Microsoft Visual Studio\\VC98\\Lib
To your local directory. setup.py install
This way you will compile the library using the deprecated NTWDBLIB which is the one used by pymssql.
The directory <pymssql root>\\freetds\\vs2008_32\\
(or <pymssql root>\\freetds\\vs2008_64\\
if you use 64bits python) has not been set for header files and libs yet I think.
About freetds, please check the "Building FreeTDS" part of README_building_and_developing.rst.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.