\section{Unix: GTK+ and Motif}\label{installunix}
-\subsection{The most simple case}
+\subsection{The simplest case}
If you are compile wxWindows on Linux for the first time and don't like to read
install instructions, just do this in the base directory:
cd ..
\end{verbatim}
-\subsection{The most simple errors}
+\subsection{The simplest errors}
\begin{itemize}\itemsep=0pt
\item Configure reports, that you don't have GTK 1.2 installed although you are
if it includes the path to the correct gtk-config! The check your LDPATH if it
points to the correct library. There is no way to compile wxGTK if configure
doesn't pass this test as all this test does is compile and link a GTK program.
-\item You get errors during compilation: The reason is that you probably have a broken
-compiler, which includes almost everything that is called gcc. If you use gcc 2.8
-you have to disable optimsation as the compiler will give up with an internal
-compiler error.You get immediate segfault when starting any sample or application: This is either
-due to having compiled the library with different flags or options than your program -
-typically you might have the __WXDEBUG__ option set for the library but not for your
-program - or due to using a broken compiler (and its optimisation) such as GCC 2.8.
+\item You get errors during compilation: The reason is that you probably have a
+broken compiler. GCC 2.8 and earlier versions and egcs are likely to cause
+problems due to incomplete support for C++ and optimisation bugs. Best to use
+GCC 2.95 or later.
+\item You get immediate segfault when starting any sample or application: This is
+either due to having compiled the library with different flags or options than
+your program - typically you might have the \_\_WXDEBUG\_\_ option set for the
+library but not for your program - or due to using a compiler with optimisation
+bugs.
\end{itemize}
-\subsection{The most simple program}
+\subsection{The simplest program}
Now create your super-application myfoo.app and compile anywhere with:
\begin{verbatim}
- gcc myfoo.cpp `wx-config --libs --cflags` -o myfoo
+ g++ myfoo.cpp `wx-config --libs --cxxflags` -o myfoo
\end{verbatim}
\wxheading{General}
\wxheading{Libraries needed}
wxWindows/GTK requires the GTK+ library to be installed on your system. It has to
-be a stable version, preferebly version 1.2.3.
+be a stable version, preferably version 1.2.3.
You can get the newest version of the GTK+ from the GTK homepage at:
\begin{itemize}\itemsep=0pt
\item RedHat 5.1
-\item Debian 2.0
+\item Debian 2.0 and 3.0
\item Stampede
\item DLD 6.0
\item SuSE 6.0
You can disable thread support by running
\begin{verbatim}
-./configure "--disable-threads"
+./configure --disable-threads
make
su <type root password>
make install
If you have pthreads library installed, but have a gtk version
which does not yet support threading, you need to explicitly
-diable threading by using the option --disable-threads.
+disable threading by using the option --disable-threads.
Note that configure assumes your flex will generate files named
"lexyy.c", not "lex.yy.c". If you have a version which does
--enable-no_deps Enable compilation without creation of
dependency information.
- --enable-permissive Enable compilation without creation of
- giving erros as soon as you compile with
- Solaris' ANSI-defying headers.
+ --enable-permissive Enable compilation without checking for strict
+ ANSI conformance. Useful to prevent the build
+ dying with errors as soon as you compile with
+ Solaris' ANSI-defying headers.
--enable-mem_tracing Add built-in memory tracing.
--disable-clipboard Disables Clipboard.
- --disable-serial Disables object instance serialiasation.
+ --disable-serial Disables object instance serialisation.
--disable-streams Disables the wxStream classes.
warning messages depending in your compiler.
If you want to be more selective, you can change into a specific
-directiry and type "make" there.
+directory and type "make" there.
Then you may install the library and it's header files under
/usr/local/include/wx and /usr/local/lib respectively. You
\subsubsection{Creating a new Project}
-1) The first way uses the installed libraries and header files
+1\ket The first way uses the installed libraries and header files
automatically using wx-config
\begin{verbatim}
-gcc myfoo.cpp `wx-config --cflags --libs` -o myfoo
+g++ myfoo.cpp `wx-config --cxxflags --libs` -o myfoo
\end{verbatim}
Using this way, a make file for the minimal sample would look
like this
\begin{verbatim}
-CC = gcc
+CXX = g++
minimal: minimal.o
- $(CC) -o minimal minimal.o `wx-config --libs`
+ $(CXX) -o minimal minimal.o `wx-config --libs`
minimal.o: minimal.cpp mondrian.xpm
- $(CC) `wx-config --cflags` -c minimal.cpp -o minimal.o
+ $(CXX) `wx-config --cxxflags` -c minimal.cpp -o minimal.o
clean:
rm -f *.o minimal
\end{verbatim}
This is certain to become the standard way unless we decide
-to sitch to tmake.
+to stick to tmake.
-2) The other way creates a project within the source code
+2\ket The other way creates a project within the source code
directories of wxWindows. For this endeavour, you'll need
GNU autoconf version 2.14 and add an entry to your Makefile.in
to the bottom of the configure.in script and run autoconf