CppGui is only available through svn, and requires boost from svn too, which is not yet released.

You should first create a directory where cppgui and dependencies are going to stay. I'll use a directory named projects.

mkdir projects
cd projects

To download boost, you must have subversion 1.4 installed and type this:

svn co http://svn.boost.org/svn/boost/trunk boost

For cppgui:

svn co http://cppgui.svn.sourceforge.net/svnroot/cppgui/trunk cppgui

CppGui uses boost.build v2, so before compiling cppgui you must configure it.

Create a boost-build.jam file inside projects directory, containing:

JAMFILE = [Bb]uild.sh [Jj]amfile.v2 [Jj]amfile ;
boost-build ./boost/tools/build/v2 ;

Then go to boost/tools/jam/src and run build.bat if you're running windows, or build.sh otherwise. When it finishes compiling, go to bin.xxx, where xxx is your platform, and copy bjam's executable to a directory in the PATH environment variable.

If you're using a compiler which can't be deduced by Boost.Build, create a file user-config.jam in your HOME directory. It must contain:

import toolset : using ;

using your-compiler ;

Note

You can see all supported compilers in the boost/tools/build/v2/tools directory.

Note

The HOME directory equivalent for Windows is X:\Documents and Settings\user, where X is the volume where Windows is installed, and user is the current user login. Under Windows Vista it is used X:\Users\user where X and user means the same.

If you want to use cppgui with GTK+, you must use gtk.jam toolset from the tools subdirectory in the cppgui tree. Just copy this file to boost/tools/build/v2/tools, then add this sentence to user-config.jam:

using gtk ;

Caution

If you haven't created user-config.jam, see the previous sub-topic on how to do it.

Tip

If you don't want to configure the gtk toolset for all your boost copies, you can use the site-config.jam file inside your boost.build directory

Tip

If pkg-config doesn't work in your platform, e.g. native Windows, you can create a Jamfile.v2 inside cppgui root tree. Create a gtk project and an alias to all include files and libraries to link called gtk, and ignore the gtk toolset.

To compile all examples you must type:

bjam examples gui-driver=your-gui-driver

There are now only two gui-drivers: win32 and gtk. This represents the implementation layer of the cppgui library.

So if you use GTK+:

bjam examples gui-driver=gtk

Or if you use Windows:

bjam examples gui-driver=win32

All executables and dependencies will be stored in examples subdirectory. If you're running Linux and linking the libraries as shared libraries, you might need to export LD_LIBRARY_PATH with the examples directory or ., which represents the current directory, to run the examples.

export LD_LIBRARY_PATH=.
cd examples
./calculator