Compilation of wxWindows / wxGTK

rmunn at rmunn at
Mon Sep 30 23:08:42 PDT 2002

If you ever include wxWindows ( or wxGTK (the
GTK binding of wxWindows) in the BLFS book, here's what I had to do to
get it to compile.

I was using wxGTK version 2.2.9, the latest stable-release version as of
September 26, 2002 (when I downloaded it). I have not tested the most
current version of wxGTK, version 2.3.3, to discover if it has the same
issues or not -- but a straightforward "./configure --prefix=/usr ; make
; make install" did not work. The compile failed on file
src/common/fs_zip.cpp with the following error message:

In file included from ./src/common/fs_zip.cpp:34:
src/common/unzip.h:121: syntax error before `('
src/common/unzip.h:262: syntax error before `('

The vertical ellipses elide about a dozen or so copies of the same
error, with only line numbers changing. Doing a little research, I found
the following discussion thread was probably relevant:

What appears to be going on is that src/common/unzip.h (from the wxGTK
distribution) is #including <zlib.h>, which itself #includes <zconf.h>.
The CFLAGS and CXXFLAGS wxGTK's main Makefile specify /usr/X11R6/include
in the include search path, and so that's where gcc was picking up
zlib.h and zconf.h -- from the include files provided with XFree86
version 4.2.1. Those include files are for zlib version 1.0.8 (look for
string ZLIB_VERSION in zlib.h), whereas the zlib include files I had in
/usr/include were for zlib version 1.1.4 (again, ZLIB_VERSION in
zlib.h). My gcc version is 2.95.3.

To solve the problem, what worked for me was the following build

CXXFLAGS=/usr/include ./configure --prefix=/usr
make install

This put /usr/include at the start of the include path and ensured that
gcc was picking up zlib.h and zconf.h version 1.1.4 from /usr/include
instead of version 1.0.8 from /usr/X11R6/include.

I don't know if this advice will be useful to you, but if you do decide
at some future point to include wxWindows and/or wxGTK in the BLFS book,
hopefully having this message in the blfs-dev archives will save you
some headscratching.

Robin Munn
rmunn at
Unsubscribe: send email to listar at
and put 'unsubscribe blfs-dev' in the subject header of the message

More information about the blfs-dev mailing list