Building wxPython on Windows

I wimped out and used VC++ 6.0 instead of mingw. Can't go wrong using
the tool that wxPython is already configured for...

Well actually, you can. Out of the box, wxPythonSrc-2.4.0.7.tar.gz did
not build *as-is* and I suspect it does not in general. The compilation
errors look like "all or nothing" situations:

First problem was:
printfw.cpp
src\msw\printfw.cpp(1635) : error C2065: 'wxPostScriptDC' : undeclared
identifier

Digging through the mailing list archives, I found the fix was to tweak
setup.h to turn on PostScript support:
#define wxUSE_POSTSCRIPT 1

Next problem was another weird compilation error. Again the mailing
list, per Robin, fixed it:
  "You need to set wxUSE_DYNLIB_CLASS to 1 in setup.h, or set
BUILD_DLLWIDGET to 0 in setup.py."

After those two fixes, it builds and runs fine. I'm curious if
printfw.cpp really needs wxUSE_POSTSCRIPT on Windows, but I'm guessing
that's a wx-user question.

Environment: Python.org 222 and Windows 2k with VC++ 6.0.

My impression is that in the next wxPython release, the setup0.h file
should have wxUSE_POSTSCRIPT and wxUSE_DYNLIB_CLASS set to 1.

···

--
Chuck
http://ChuckEsterbrook.com

Chuck Esterbrook wrote:

My impression is that in the next wxPython release, the setup0.h file should have wxUSE_POSTSCRIPT and wxUSE_DYNLIB_CLASS set to 1.

I use this script to make setup.h based on wxPython/BUILD.win32.txt

HTH
Niki Spahiev

setuph.py (954 Bytes)

So you're taking Robin's setup commentary in his "readme" file and
injecting it into the actual code. That's awesome.

···

On Thursday 08 May 2003 12:59 am, Niki Spahiev wrote:

Chuck Esterbrook wrote:
> My impression is that in the next wxPython release, the setup0.h
> file should have wxUSE_POSTSCRIPT and wxUSE_DYNLIB_CLASS set to 1.

I use this script to make setup.h based on wxPython/BUILD.win32.txt

HTH
Niki Spahiev

--
Chuck
http://ChuckEsterbrook.com

Chuck Esterbrook wrote:

After those two fixes, it builds and runs fine. I'm curious if printfw.cpp really needs wxUSE_POSTSCRIPT on Windows, but I'm guessing that's a wx-user question.

It is if you want to have a wxPostscriptDC available on Windows, which some people do use.

Environment: Python.org 222 and Windows 2k with VC++ 6.0.

My impression is that in the next wxPython release, the setup0.h file should have wxUSE_POSTSCRIPT and wxUSE_DYNLIB_CLASS set to 1.

The sources I put in the tarball have always been the same as what is in CVS, in fact up until recetly I always did a separate "cvs export" to make the tarball. It probably wouldn't hurt though to customize setup0.h and Niki's script will help...

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!