[PyKDE] PyQt, Win32, and tmake

Randy Weems rweems at edgenet.com
Wed Aug 9 06:34:58 BST 2000


I just got PyQt-0.12 (and sip-0.12) to build under Win32. It
took about a week of playing with it in my spare time, but
all-in-all, it was relatively painless. The biggest problem I
encountered was the definition of HWND in qwindowdefs.sip. It
ultimately typedefs HWND to a void *, which works fine if you're
not building with STRICT defined, but we use the dll version of
Qt, and we really (_really_) did not want to build Qt without
STRICT.

I wanted to try changing the .sip files appropriately and
rebuild the source files, but I couldn't figure out how to get
sip to execute properly; I immediatly got errors about Version
not being defined (although, admittedly, I didn't try very hard
to figure this part out). I ended up hacking together a quick
and dirty C program that post-processed the source files
generated by sip and changed the void * (where appropriate) to
HWND. After that, libqtc.dll built just fine. Is there any sort
of sip documentation I could look at to do this the right way?
Is there any way, in the .sip file, to tell sip to not translate
HWND down to an intrinsic type, but rather to just leave the
type as HWND?

Out of curiosity Phil, have you considered using tmake rather
than autoconf, et al? Maybe it's just me, but autoconf/automake
scripts are just this side of  incomprehensible. Plus, correct
me if I'm wrong, there's no real autoconf/automake on Win32.
I've been using tmake to build my company's software (both Qt
based and non-Qt based) on both Linux, Solaris and Win32 without
a hitch for over a year now. The tmake .pro files are just so
much simpler. I used tmake to build PyQt-0.12 on Win32, and the
same .pro files (with some minor clean up) should work just fine
on an flavor of Unix supported by tmake.

--
Randy Weems
rweems at edgenet.com






More information about the PyQt mailing list