Issue 171: [PATCH] build pyodbc for win64 using tdm64-gcc(mingw-w64)
Status:  Started
Owner: ----
Reported by marun...@gmail.com, Apr 21, 2011
What steps will reproduce the problem?
1. generate libpython26.a for win64 using gendef
gendef.exe python26.dll
2. copy libpython26.a to [python25 win64 install path]\libs
3. download and isntall tdm64-gcc from http://tdm-gcc.tdragon.net/download
4. clone latest pyodbc source
5. try to build pyodbc package using tdm64-gcc
python26x64.exe setup.py build -c mingw32 build_ext -c mingw32 -DMS_WIN64 bdist_wininst

What is the expected output? What do you see instead?
It is expected tha pyodbc module for win64 is built without error.
But, compile error occurred.

What version of the product are you using? On what operating system?
Python26, Windows7 64bit SP1.

Please provide any additional information below.
libpython26.a : import library for python26 win64 generated by gendef.
build_tdm64-gcc.patch : patch for build using tdm64-gcc

build_tdm64-gcc.patch
1.7 KB   View   Download
python26.lib
209 KB   Download
Apr 21, 2011
#1 marun...@gmail.com
I use the 4.5.2-tdm64-1 version.
Apr 22, 2011
#3 marun...@gmail.com
I attach the 64bit installers of pyodbc for python 2.5/2.6 built by tdm64-gcc.
pyodbc-2.1.0-unsupported.win64-py2.5.exe.7z
161 KB   Download
pyodbc-2.1.0-unsupported.win-amd64-py2.6.exe.7z
159 KB   Download
May 20, 2011
Project Member #4 mkleehammer
Thanks for the patches.  I'll make the suggested changes (after testing, of course), but I can't promise mingw will always build.  My official stance is that I don't support mingw since Python itself is built with Visual C++ but I'll certainly try to keep it working.

Status: Started
May 20, 2011
#5 marun...@gmail.com
Thanks for accepting my patch.
I add the more detail build order.

1. generate python26.def for win64 using gendef.
gendef : http://sourceforge.net/projects/mingw/files/MinGW/gendef/
E:\gendef\bin>gendef.exe python26.dll
* [python26.dll] Found PE+ image

2. download and isntall tdm64-gcc from http://tdm-gcc.tdragon.net/download

3. add tdm64-gcc\bin to PATH.

4. generate libpython26.a for win64 using dlltool
E:\gendef\bin>dlltool -d python26.def -l libpython26.a

5. copy libpython26.a to [python26 win64 install path]\libs

6. clone latest pyodbc source

7. try to build pyodbc package using tdm64-gcc
python26x64.exe setup.py build_ext -c mingw32 -DMS_WIN64 build -c mingw32 bdist_wininst