I am having an issue compiling mysql-python on windows 7 using Mingw32. This is my first time compiling it with Mingw32 and not using Microsoft Visual Studio compilers. I have gotten pretty far using tutorials on the net but hit a road block.
*Setup*: Windows 7 Ultimate Python 2.6 MySQL-python-1.2.3c1 mysql-essential-5.1.43-win32 MinGW-5.1.6 *What I have done so far*: * Installed MySQL with the source files * Placed the pydistutils.cfg in C:\Python26\Lib\distutils with the following in it: [build] compiler=mingw32 * Put the following in my path C:\Python26\;C:\Python26\Scripts\; C:\Program Files\MySQL\MySQL Server 5.1\bin\; C:\MinGW\bin\; * Updated the site.cfg file in mysql python to mysql version 5.1 from 5.0 so it pulls the correct registry key registry_key = SOFTWARE\MySQL AB\MySQL Server 5.1 *The error:* * running install running bdist_egg running egg_info writing MySQL_python.egg-info\PKG-INFO writing top-level names to MySQL_python.egg-info\top_level.txt writing dependency_links to MySQL_python.egg-info\dependency_links.txt reading manifest file 'MySQL_python.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'MySQL_python.egg-info\SOURCES.txt' installing library code to build\bdist.win32\egg running install_lib running build_py creating build creating build\lib.win32-2.6 copying _mysql_exceptions.py -> build\lib.win32-2.6 creating build\lib.win32-2.6\MySQLdb copying MySQLdb\__init__.py -> build\lib.win32-2.6\MySQLdb copying MySQLdb\converters.py -> build\lib.win32-2.6\MySQLdb copying MySQLdb\connections.py -> build\lib.win32-2.6\MySQLdb copying MySQLdb\cursors.py -> build\lib.win32-2.6\MySQLdb copying MySQLdb\release.py -> build\lib.win32-2.6\MySQLdb copying MySQLdb\times.py -> build\lib.win32-2.6\MySQLdb creating build\lib.win32-2.6\MySQLdb\constants copying MySQLdb\constants\__init__.py -> build\lib.win32-2.6\MySQLdb\constants copying MySQLdb\constants\CR.py -> build\lib.win32-2.6\MySQLdb\constants copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win32-2.6\MySQLdb\constants copying MySQLdb\constants\ER.py -> build\lib.win32-2.6\MySQLdb\constants copying MySQLdb\constants\FLAG.py -> build\lib.win32-2.6\MySQLdb\constants copying MySQLdb\constants\REFRESH.py -> build\lib.win32-2.6\MySQLdb\constants copying MySQLdb\constants\CLIENT.py -> build\lib.win32-2.6\MySQLdb\constants running build_ext building '_mysql' extension creating build\temp.win32-2.6 creating build\temp.win32-2.6\Release C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -Dversion_info=(1,2,3,'gamma',1) -D__version__=1.2.3c1 "-IC:\Program File s\MySQL\MySQL Server 5.1\include" -IC:\Python26\include -IC:\Python26\PC -c _mysql.c -o build\temp.win32-2.6\Release\_mys ql.o /Zl gcc: /Zl: No such file or directory In file included from _mysql.c:34: C:/Program Files/MySQL/MySQL Server 5.1/include/config-win.h:160:1: warning: "isnan" redefined In file included from C:/Python26/include/pyport.h:235, from C:/Python26/include/Python.h:58, from pymemcompat.h:10, from _mysql.c:29: C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/math.h:411:1: warning: this is the location of the previous def inition In file included from _mysql.c:34: C:/Program Files/MySQL/MySQL Server 5.1/include/config-win.h:171:1: warning: "SIZEOF_OFF_T" redefined In file included from C:/Python26/include/Python.h:8, from pymemcompat.h:10, from _mysql.c:29: C:/Python26/include/pyconfig.h:361:1: warning: this is the location of the previous definition In file included from _mysql.c:34: C:/Program Files/MySQL/MySQL Server 5.1/include/config-win.h:203:1: warning: "finite" redefined C:/Program Files/MySQL/MySQL Server 5.1/include/config-win.h:161:1: warning: this is the location of the previous definit ion C:/Program Files/MySQL/MySQL Server 5.1/include/config-win.h:269:1: warning: "HAVE_STDDEF_H" redefined In file included from C:/Python26/include/Python.h:8, from pymemcompat.h:10, from _mysql.c:29: C:/Python26/include/pyconfig.h:647:1: warning: this is the location of the previous definition error: command 'gcc' failed with exit status 1 * * * I checked the source code and tried to remove all the errors where it said it was "redefined" but ended up with even more problems. Any ideas what could be wrong?
_______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32