[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Mingw-cross-env-list] Crosscompiling and linking against Win32 Pyth
Re: [Mingw-cross-env-list] Crosscompiling and linking against Win32 Python, possible?
Thu, 24 Mar 2011 19:05:55 +0100
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:22.214.171.124) Gecko/20110223 Lightning/1.0b2 Thunderbird/3.1.8
I have no experience with writing a Python compiler, but I did include
the Python interpreter in TeXworks when building it with mingw-cross-env.
On 2011-03-24 10:40, Kay Hayen wrote:
> Now with Python, I decided I would download and install the
> ActiveState build with wine and access the Python include files and
> Libraries from there.
That's what I did, too.
> 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
> -Wl,--enable-auto-import pystone.build/static/CompiledFunctionType.o
> pystone.build/__constants.o pystone.build/__main__.o
> -L/home/hayen/.wine/drive_c/windows/system32 -lpython26
> /home/hayen/.wine/drive_c/windows/system32/user32.dll: file not
> recognized: File format not recognized
All I can say is that I didn't have to add the windows/system32 path. I
basically just had to add
In fact, I'd rather avoid pulling in anything from Wine, as I'm not sure
how well this works on a "real" Windows.
With the line above, I just have to distribute the python27.dll and
(some) precompiled Python scripts (.pyc) in the Lib folder along with
the main application. (To get the .pyc files, I just ran `wine python`
BTW: AFAIK, mingw-cross-env statically links user32, at least there is a
libuser32.a in usr/i686-pc-mingw32/lib.