Advanced use of configure - integration between wxWidgets and wxHatch and
your own projects
In the Building wxHatch pages, simple
instructions for using configure were provided. From version 1.35, wxHatch
has the ability to interact with configure in more complex ways.
wxWidgets in subdirectories from the commandline
- In particular, wxhatch is no
longer restricted to requiring wxWidgets configure to have been run in
the root of the wxWidgets tree. This allows multiple builds of wxWidgets
to share the same sources. wxWidgets is often built in subtrees or even
outside the wxWidgets tree.
- wxHatch will create
subfolders of the wxWidgets root dir, and you can use its GUI to
configure and make wxWidgets in this subfolder
- For your projects, wxHatch will also generate
redistributable configure.in , configure and Makefile.in , details are below
For example, suppose wxWidgets sources are in ~/wx , so that wxWidgets' configure is in
Then, to build both debug and release builds of wxWidgets you can do
If wxHatch is also extracted into ~/wx
You can then build debug and release versions of wxHatch by doing
When running wxHatch, you can build debug and release versions of your own
projects by using Choose | wxWidgets Directory and switching between
wxWidgets/mydebug and wxWidgets/myrelease
You can also create further
wxWidgets configurations by using Choose | Select wxWidgets directory, creating a
new directory and then using Make | Configure wxWidgets and Make |
ReBuild wxWidgets Library
Out of tree builds
You can also build wxWidgets outside the wx wxwidgets tree, and wxHatch
then needs a second parameter, --with-wxWINMAINDIR which gives the path to wxWidgets main
(top) directory. For example,
You can use
wxhatch to generate configure.in and Makefile.in for your own out of tree projects which can tten be used by those without wxHatch like
Configure in Your own projects
When you select compiler chosen by configure in the compiler choice dialog,
wxHatch will create two files, configure.in and Makefile.in . If you don't have
autoconf on your
platform, you can distribute these files to users, who can use
autoconf and a unix
toolchain to compile your projects. If autoconf is found on your system's path, then
autoconf will be
run and the configure file generated and run. The
script can be distributed with your project - this will allow users with
development tools to run configure and make to build the project on their
The configure script will follow the wxhatch syntax, expecting two paramters
and --with-wxWINMAINDIR . These enable the script to locate the
wxwidgets headers and libraries.
contains hardcoded version information, which your users may need to edit if
the version of wxWidgets
your users have does not
match your version.
Sometimes you may get output like this:
Compiler output from project XXXXX saved at 2005-12-12 09:31:39
Starting job C:\wx\msys\1.0\bin\sh.exe -c 'autoconf'
Can't locate object method "path" via package "Autom4te::Request"
(perhaps you forgot to load "Autom4te::Request"?) at /usr/bin/autom4te
Ended job C:\wx\msys\1.0\bin\sh.exe -c 'autoconf'
This is due to changing autoconf versions; fix it by deleteing the directory autom4te.cache