Ben Wolfe - 2007-08-08

Logged In: YES
user_id=1853426
Originator: YES

I had to amend line 19 in setup_windows.py in 1.2.2
from
libraries = [ 'kernel32', 'advapi32', 'wsock32', client ]
to
libraries = [ 'kernel32', 'advapi32', 'wsock32', client, 'msvcrt' ]

I was getting linker errors while building with Visual C++ 98:

python setup.py build
running build
running build_py
copying MySQLdb\release.py -> build\lib.win32-2.3\MySQLdb
running build_ext
building '_mysql' extension
D:\Program Files\Microsoft Visual Studio\VC98\BIN\link.exe /DLL /nologo /INCREMENTAL:NO "/LIBPATH:C:\Program Files\MySQL\MySQL Server 5.0\lib\opt" /LIBPATH:C:\Python\Python23\libs /LIBPATH:C:\Python\Python23\PCBuild kernel32.lib advapi32.lib wsock32.lib mysqlclient.lib /EXPORT:init_mysql build\temp.win32-2.3\Release_mysql.obj /OUT:build\lib.win32-2.3_mysql.pyd /IMPLIB:build\temp.win32-2.3\Release_mysql.lib
Creating library build\temp.win32-2.3\Release_mysql.lib and object build\temp.win32-2.3\Release_mysql.exp
LINK : warning LNK4049: locally defined symbol "_strncpy" imported
LINK : warning LNK4049: locally defined symbol "_sprintf" imported
_mysql.obj : error LNK2001: unresolved external symbol impstrncat
build\lib.win32-2.3_mysql.pyd : fatal error LNK1120: 1 unresolved externals
error: command '"D:\Program Files\Microsoft Visual Studio\VC98\BIN\link.exe"' failed with exit status 1120

I'm not sure if this is related to just visual studio or whether this will effect users of the windows gcc build.