Setup wxWidgets for C++ Library on Ubuntu 18.04

  • Since the official Ubuntu repository is likely to have a dated wxWidgets version , the best option is to download the source code and compile it
  • From https://www.wxwidgets.org/downloads/ under Latest Development Release click on Source for Linux, MacOS etc.
  • This will download the tar file. Unzip the archive into a folder eg wxGTK.
  • Make sure the basic development libraries are already present on the system: sudo apt-get install libgtk-3-dev build-essential checkinstall
  • Make the unzipped directory as current eg. cd /var/wxGTk
  • Create a directory to build the library and start the build process:
          mkdir gtk-build
          cd gtk-build/

  • Configure the build flags and run configure followed by make
           ../configure --disable-shared --enable-unicode
           sudo make install
           sudo ldconfig
  • Test the configuration with the following commands:
wx-config --version 
wx-config --list 

Be the first to comment

Leave a Reply

Your email address will not be published.


*