tl;dr: I managed to build an installer:
For over a day I've been trying to build my own binary of Mysql-python 1.2.3
for Python 2.5 using Visual Studio 2003. But no matter what I tried, I always
ended up with a handful of linking errors, or a working installer that was
dependent on an external libmysql.dll.
The problem turned out to be that Python 2.5 kinda demands Visual Studio 2003
and that the Mysql libraries are built using Visual Studio 2008. The solution
was to download the source code of Mysql's C connector, build that using
Visual Studio 2003 and use the resulting mysqlclient.lib to build the Mysql-
Software used: WinXP SP3, Visual Studio 7 .Net 2003, Cmake 2.8.2
1 - Download and extract the source zip from http://dev.mysql.com/downloads/c
2 - From the command line, inside the root of the mysql source code run: cmake
-G "Visual Studio 7 .NET 2003"
3 - This results in a Visual Studio solution file which you open Visual
4 - Set the configuration to 'Release' and build the solution
5 - If all goes well, you'll find the mysqlclient.lib in the libmysql\release
When you use that library to link against, you should end up with a working
The only difference is that my version ended up depending on ws2_32 instead of
wsock32, but that shouldn't give problems. After installation all but 2 Mysql-
python unit tests were passed, due to mysql user permissions in my hastily
launched, unconfigured Mysql server.
This just saved the day... thank you so much!
Log in to post a comment.