djhenderson / pyodbc

Automatically exported from code.google.com/p/pyodbc
MIT No Attribution
0 stars 0 forks source link

[PATCH] build pyodbc for win64 using tdm64-gcc(mingw-w64) #171

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
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

Original issue reported on code.google.com by marun...@gmail.com on 22 Apr 2011 at 5:38

Attachments:

GoogleCodeExporter commented 9 years ago
I use the 4.5.2-tdm64-1 version.

Original comment by marun...@gmail.com on 22 Apr 2011 at 5:52

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I attach the 64bit installers of pyodbc for python 2.5/2.6 built by tdm64-gcc.

Original comment by marun...@gmail.com on 22 Apr 2011 at 7:52

Attachments:

GoogleCodeExporter commented 9 years ago
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.

Original comment by mkleehammer on 20 May 2011 at 7:32

GoogleCodeExporter commented 9 years ago
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

Original comment by marun...@gmail.com on 21 May 2011 at 1:39