As Open Sound System (OSS) is not any longer part of recent Ubuntu (12.04) version, the sound in wxWidgets based applications is broken. This bug is already confirmed by the Ubuntu developers, but until a working update is available, a solution is presented here.
First of all, the wxWidgets library has to be installed. This can be done by the the apt-command:
Now, the sound can be tested by compiling and executing the wxsoundcheck sample, which is available on github.
After downloading, it can be compiled and executed with following commands:
After compiling the wxsoundcheck, the application can be started with:
Then you can select between different sounds and methods, the sound is played:
If you hear a sound, you can stop reading and you know your sound is working well with wxWidgets.
Of you do not hear a sound, follow the instructions below to bring sound back on your Ubuntu.
First of all the the previously installed wxWidgets-library has to be removed. This can be done by following apt-command:
In the next step, the libsdl package must be installed. This package brings the sound support back.
Then, the sources of the current stable version of wxWidgets have to be download from http://www.wxwidgets.org/downloads/#latest_stable
After that, the following steps have to be done on the terminal.
adapt path as needed
Then create a new build folder. This allows many parallel wxWidgets builds for example to realize separated versions for debugging and release management, or to use Unicode and an ANSI code or as static and shared implementation, etc.
Then call configure as
If it stops because of a missing package, install it (needed packages mostly have the extension -dev) and run configure again. When it stops successfully without errors, you are ready for building with
After all components have been compiled, the following overview should be given ( Note: sdl must have the value yes!):
On Ubunut systems, start the installation with:
or on other Linux distributions
then the wxWidgets installation is located at
In order to run all wxwidgets applications with this library, add the following line to your