wxWidgets Examples

Starting off with a GUI library can be quite daunting. Lots of new code and classes need to be written to get even the most basic program working. I have found that the best way to get started with wxWidgets is to look at its examples. Pick the example that implements most of what you need and start off from there.

Doing this is easy:

  • Install the wxWidgets examples:
$ sudo apt-get install wx3.0-examples
  • The examples are zipped up and need to be uncompressed before using them:
$ cd /usr/share/doc/wx3.0-examples/examples
$ ./unpack_examples.sh ~/wx-examples
  • You can build all the examples in one command:
$ cd ~/wx-examples/samples
$ make
  • Or you can go to a specific directory and build a specific example:
$ cd ~/wx-examples/samples/opengl/penguin
$ make

Tried with: wxWidgets 3.0 and Ubuntu 14.04

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s