Now create your super-application myfoo.app and compile anywhere with
-gcc -o -c myfoo.cpp -I/usr/local/include -L/usr/local/lib -lwx_gtk
+g++ myfoo.cpp `wx-config --libs` `wx-config --cflags` -o myfoo
* General
-----------------------
* Feature Options
-------------------
-When using the Windows version of wxWindows, it is possible
-to edit the file /include/wx/msw/setup.h in order to enable
-or disable some features of wxWindows so that the resulting
-binaries get smaller.
-
As I don't yet care for binary size and target mainly at
producing a shared library, wxWindows's configure system auto-
matically enables all features, as long as they are already
-implemented.
+implemented. It is currently NOT possible to disable these
+options (in contrast to what configure tells you).
* Compiling
-------------
The following must be done in the base directory (e.g. ~/wxGTK
or ~/wxWin or whatever)
-Dependencies are generated automatically using
-
- make depend
-
-(For some reason, this doesn't seem to work.)
-
-Now the makefiles are created you can compile everything is as simple
-as typing:
+Now the makefiles are created and you can compile everything
+by typing:
make
make yourself some coffee, as it will try to compile ALL the
-files in this distribution.
+files in this distribution. During compilation, you'll get
+a few warning messages.
if you want to be more selective:
* Creating a new Project
--------------------------
-There are two ways to create your own project. The first creates
-a project within the source code directories of wxWindows: In this
-case I propose to put all contributed programs in the directory
-"/user", with a directory of its own.
+There are two ways to create your own project:
+
+1) The first way uses the installed libraries and header files
+automatically using wx-config
+
+g++ myfoo.cpp `wx-config --libs` `wx-config --cflags` -o myfoo
+
+Using this way, a make file for the minimal sample would look
+like this
+
+CC = g++
+
+minimal: minimal.o
+ $(CC) -o minimal minimal.o `wx-config --libs`
+
+minimal.o: minimal.cpp mondrian.xpm
+ $(CC) `wx-config --cflags` -c minimal.cpp -o minimal.o
+
+clean:
+ rm -f *.o minimal
+
+This is certain to become the standard way unless we decide
+to sitch to tmake.
+
+2) The other way creates a project within the source code
+directories of wxWindows: In this case I propose to put
+all contributed programs in the directory "/user", with a
+directory of its own.
This directory then should include the following files:
put ALL your source code along with all the other stuff you need for
your application in this directory (subdirectories are welcome).
-The other way uses the installed libraries and header files in
-/usr/local/include/wx and /usr/local/lib. In this case, just
-compile your program like this:
-
-gcc -o -c myfoo.cpp -I/usr/local/include -L/usr/local/lib -lwx_gtk
-
** Something about Makefiles
------------------------------