Building wxPython [was Re: wxPython and DISLIN work nicely together]

Robin Dunn robin at alldunn.com
Fri Nov 19 14:47:23 EST 1999


>
> And to the former, here's my 'wx-config --cflags' output:
>
>     > wx-config --cflags
>     -I/home/rhh/software/wxGTK-2.1.11/include -I/home/rhh/software/wxGTK-2
.1.11/lib/wx/include -D__WXMOTIF__ -I/usr/Motif-1.2/include
>
>

Well, this will be a problem for you if you get past he other compilation
issues as wxPython isn't ready for Motif yet.  (I'm going to attempt it
again soon.)  If you want to use wxPython now you'll need to build and
install glib and gtk version 1.2.3 (1.2.6 might work too) from www.gtk.org,
and then configure and build wxWindows with the --with-gtk flag.

> Leafing through build.py, the problem is that wxPython assumes wxGTK's
> wx-config is in $PATH.  I don't have root so I don't install things in
> /usr/local/*.  (I also don't like having package intermingle in a shared
> directory tree; too hard to remove them later.)

"make uninstall" works.

> So the change to hack
> around this is to temporarily add $WXWIN's bin directory to $PATH:
>
>      env PATH=$WXWIN/bin:$PATH /usr/local/bin/python \
>          $WXWIN/utils/wxPython-2.1.11/distrib/build.py -b MAKE=gmake
>
> Perhaps wxPython should have a --with-wxwindows= option, or take it's
> queues off of $WXWIN?
>

wxWindows is designed to use wx-config for all apps that are built using
wxWindows, (except for its samples/tests.)  That is why it made a bin
directory under your install prefix.  The gtk and glib libraries work this
same way.


> It then went on a little further to try and compile helpers.cpp, but
failed
> with 84 errors, all (or almost all) due to a bad NULL comparisons in the
> wxWindows header files.  NULL is defined as ((void*)0) and cannot be
> assigned to / compared with another type without a cast in C++.  As this
is
> C++, I believe they should be using "0" for assignments and comparisons.
>

I don't know how accurate this is but I've been told that C++ compilers that
have NULL defined as ((void*)0) in their headers are the ones that are
incorrect, not the code that uses NULL.  The headers are supposed to define
it as 0.  Maybe you could try undef'ing it and redefining NULL to be 0 and
see what happens?

This makes me wonder how you built wxWindows at all if these errors are in
the wxWindows headers...  What about the wxWindows sample apps, do they
compile?


--
Robin Dunn
Software Craftsman
robin at AllDunn.com
http://AllDunn.com/robin/
http://AllDunn.com/wxPython/  Check it out!






More information about the Python-list mailing list