[PyQt] How do you compile 64bit PyQt on Windows w/o Visual Studio.
Phil Thompson
phil at riverbankcomputing.com
Fri May 18 10:17:22 BST 2012
On Thu, 17 May 2012 17:46:21 -0700, Brian Knudson <briank at pipelinefx.com>
wrote:
> I'm trying to compile 64bit PyQt on Windows 7. (I am a commercial
> customer, so I have to build PyQt, AFAIK). I've downloaded MinGW & had
> good success getting SIP compiled, but I couldn't compile PyQt. I
deduce
> that this is because I have 64bit Python with a 32bit MinGW & the libs
> aren't matching. Fair enough, now I've downloaded & installed (read:
> unpacked) MinGW64, but I have 2 big questions:
>
> 1. Short of editing all the makfiles to use "x86_64-w64-mingw32-g++.exe"
> rather than "g++" for the compiler, is there a way to tell the configure
> step to use the 64bit MinGW? I see that the standard build toolchain
often
> takes --host, but that doesn't seem to be the case for sip or pyqt.
There
> also doesn't seem to be a platform options for mingw64.
PyQt's configure.py uses the information in your Qt installation's qmake
mkspec files. So things should work if your Qt supports building with
MinGW64.
> 2. (Possibly more important). When I compiled the 32bit version of sip
> with MinGW, I needed to make a libpython26.a from python26.dll. I say
> "needed" as the python libs weren't found during compile (causing it to
> fail) and my research lead me to this necessity. After putting
> libpython26.a in place, the build completed successfully (I actually
found
> a libpython26.a available for download as my attempts to build one
failed
> due to word-size mismatch). The pexporter I've attempted to recompile
> pexporter using mingw64's g++, but it segfaults when I try to run it on
the
> 64bit python26.dll. With that:
> 2.a. Is it necessary to create a libpython26.a to compile with mingw's
> g++ on Windows? If not, what's the other way of doing it? If so, are
> there any good instructions for making it?
> 2.b. How does one do this for 64bit python26.dll?
>From memory (so I may be wrong) it's no longer necessary to do this and
hasn't been for some time (if you have a recent enough version of MinGW).
> I'm not stuck on MinGW, but would love to do this w/o using Visual
Studio.
> Open to suggestion. I have a license of VS2005, fwiw, and will use that
> if it will make life easier, but would rather not if I can help it. I
am a
> neophyte when it comes to Visual Studio - I'm not really sure how to
even
> start with that - searching the help for "makefile" didn't bring up
> anything useful.
I use the free Express version of MSVC2008. With the right magic this can
be configured for 64 bits. I can send you instructions if you want to
follow this route.
Phil
More information about the PyQt
mailing list