[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Mingw-cross-env-list] Crosscompiling and linking against Win32 Python,
[Mingw-cross-env-list] Crosscompiling and linking against Win32 Python, possible?
Thu, 24 Mar 2011 10:40:54 +0100
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:184.108.40.206) Gecko/20110303 Icedove/3.0.11
Here is what I am doing, I am the author of a Python compiler that so
far was only available for Linux. But somebody took the necessary steps
to make it portable and it seems to compile on native Win32 with mingw now.
That's a great achievement, because I wasn't shy to heavily depend on
latest g++ and POSIX only interfaces.
Now my goal is now to be able to cross-compile the Python source code to
Win32 binaries as well. These compiled binaries need to link the Python
library to run.
So I installed gcc-mingw32 on my Debian, but I found out it's too old
(4.4, this is Wheezy), so I found your mingw-cross-env and used it to
install the latest version 2.19 to install a cross compiler 4.5.2, which
appears to work fine. I did only "make gcc" which seems to imply
"w32api", so that's good.
Now with Python, I decided I would download and install the ActiveState
build with wine and access the Python include files and Libraries from
Then I integrated that into scons, and it finally comes up with a
command like this:
# /opt/mingw/usr/bin/i686-pc-mingw32-g++ -o pystone.exe
/home/hayen/.wine/drive_c/windows/system32/user32.dll: file not
recognized: File format not recognized
The problematic library has this type:
# file /home/hayen/.wine/drive_c/windows/system32/user32.dll
/home/hayen/.wine/drive_c/windows/system32/user32.dll: PE32 executable
for MS Windows (DLL) (unknown subsystem) Intel 80386 32-bit
The working, native library from Python installer has this type:
# file /home/hayen/.wine/drive_c/windows/system32/python26.dll
/home/hayen/.wine/drive_c/windows/system32/python26.dll: PE32 executable
for MS Windows (DLL) (GUI) Intel 80386 32-bit
So where do I go from there? Do I have to provide native DLL files for
the build? The ones in /usr/lib32/wine-unstable/fakedlls don't seem to
cut it either.
Thanks for your help,
- [Mingw-cross-env-list] Crosscompiling and linking against Win32 Python, possible?,
Kay Hayen <=