Difference between revisions of "Compiling and getting started"
(→wxWidgets) |
(→wxWidgets) |
||
Line 16: | Line 16: | ||
Then, the following steps are done on the terminal. | Then, the following steps are done on the terminal. | ||
− | + | <source>cd /path/to/wxGTK-2.8.x # adapt path as needed | |
− | + | mkdir gtk-build | |
− | adapt path as needed | + | cd gtk-build |
− | + | </source> | |
− | |||
− | |||
− | |||
we create a new folder to build from, this enables us to have many wxWidgets builds, for instance a debug and a release one, or a Unicode and an ANSI one, or a static and a shared one, etc. | we create a new folder to build from, this enables us to have many wxWidgets builds, for instance a debug and a release one, or a Unicode and an ANSI one, or a static and a shared one, etc. | ||
Then you will need to call configure with something like | Then you will need to call configure with something like | ||
− | + | <source>../configure --enable-unicode</source> | |
+ | |||
+ | The options you pass to configure at this point will determine what build you get. | ||
+ | <table border="1"> | ||
+ | <tr><td>--enable-unicode</td><td>makes a Unicode build</td></tr> | ||
+ | <tr><td>--with-opengl</td><td>enables OpenGL support</td></tr> | ||
+ | <tr><td>--disable-shared</td><td>builds static libs instead of shared ones</td></tr> | ||
+ | <tr><td>--prefix=[...]</td><td>makes wxWidgets be installed in another location than default /usr/local</td></tr> | ||
+ | <table> | ||
− | + | (for a list of all possible options, write ''../configure --help'') | |
− | |||
− | |||
− | |||
− | |||
− | |||
If it stops saying it can't find a package, install it (with -dev packages if any) and run configure again. When it is done without errors, you are ready to build. | If it stops saying it can't find a package, install it (with -dev packages if any) and run configure again. When it is done without errors, you are ready to build. | ||
− | + | <source>make</source> | |
When the build is done, and if no error occured, you can now install it | When the build is done, and if no error occured, you can now install it | ||
− | + | <source>sudo make install</source> | |
Enter your password as needed. wxWidgets will be installed in /usr/local/ | Enter your password as needed. wxWidgets will be installed in /usr/local/ |
Revision as of 16:48, 3 March 2009
This is a guide to help you getiing started quickly and easily on Linux with wxWidgets built from source.
Contents
Before starting
Install all necessary build tools, including g++ and autotools. (On Ubuntu, you will want to install package build-essential)
You will also need gtk+ (don't forget to install the -dev package if your distro uses them). For Ubuntu 8.04 this will be libgtk-2.0-dev.
It is recommended to use at least GTK+ 2.2.3, and some features are only available when using more recent version, like GTK+ 2.8.
wxWidgets
Download the wxGTK source archive from http://www.wxwidgets.org/downloads/ and expand it. If you intend to use it in place (not install it in system dirs) choose a place where it can stay forever because you won't be able to move it without breaking the build.
Then, the following steps are done on the terminal.
cd /path/to/wxGTK-2.8.x # adapt path as needed
mkdir gtk-build
cd gtk-build
we create a new folder to build from, this enables us to have many wxWidgets builds, for instance a debug and a release one, or a Unicode and an ANSI one, or a static and a shared one, etc.
Then you will need to call configure with something like
../configure --enable-unicode
The options you pass to configure at this point will determine what build you get.
--enable-unicode | makes a Unicode build |
--with-opengl | enables OpenGL support |
--disable-shared | builds static libs instead of shared ones |
--prefix=[...] | makes wxWidgets be installed in another location than default /usr/local |