Installing wxWidgets on Debian based linux

Debian based linux like ubuntu and linux mint can use these steps to install wxWidgets.

$ sudo apt-get install build-essential

If we do not have a C++ compiler yet, we install the build-essential package.

I think this is an meta package that install the actual packages for programming task.

$ sudo apt-get install libwxgtk3.0-dev

This installs the wxWidgets package.

To test it with minimal console application that emit some text we will create console.cpp and compile it.

#include <wx/wx.h>

int main(int argc, char **argv)
{
wxPuts(wxT(“A wxWidgets console application”));
}

To compile and link console.cpp use below command on your linux terminal.

g++ console.cpp `wx-config –cxxflags –libs` -o console

Execute console after compile is done.

Bye.

Leave a Reply

Your email address will not be published. Required fields are marked *