The latest download and install instructions are available in
https://docs.wxwidgets.org/3.1/plat_gtk_install.html
The wiki is a bit old so try following the above and consult the wiki for more details. BUT, follow the steps as per the docs NOT the wiki.
https://wiki.wxwidgets.org/Compiling_and_getting_started
However sometimes specially for new linux users it can become overwhelming and installation process can throw funny errors. So I have created a step by step process to hopefully help you compile wxwidgets. Enjoy :-)
sudo apt-get install build-essential
sudo apt-get install libgtk2.0-dev
sudo apt-get install libgtk-3-dev
sudo apt-get install mesa-utils
sudo apt-get install freeglut3-dev
sudo apt-get install -y libjpeg-dev
sudo apt-get install liblzma-dev
curl -LJO https://github.com/wxWidgets/wxWidgets/releases/download/v3.0.5/wxWidgets-3.0.5.tar.bz2
tar -xvf wxWidgets-3.0.5.tar.bz2 -C wxWidgets
cd wxWidgets-3.0.5/
mkdir gtk-build
cd gtk-build
../configure --with-gtk=3 --with-opengl
--with-opengl allows for use of opengl with wxwidgets
Installation directory: /usr/local
Documentation directory: ${prefix}/share/doc/tiff-4.0.3
C compiler: gcc -g -O2 -Wall -W
C++ compiler: g++ -g -O2
Enable runtime linker paths: no
Enable linker symbol versioning: no
Support Microsoft Document Imaging: yes
Use win32 IO: no
Support for internal codecs:
CCITT Group 3 & 4 algorithms: yes
Macintosh PackBits algorithm: yes
LZW algorithm: yes
ThunderScan 4-bit RLE algorithm: yes
NeXT 2-bit RLE algorithm: yes
LogLuv high dynamic range encoding: yes
Support for external codecs:
ZLIB support: yes
Pixar log-format algorithm: yes
JPEG support: yes
Old JPEG support: yes
JPEG 8/12 bit dual mode: no
ISO JBIG support: no
LZMA2 support: yes
C++ support: yes
OpenGL support: yes
Configured wxWidgets 3.0.5 for `x86_64-pc-linux-gnu'
Which GUI toolkit should wxWidgets use? GTK+ 3 with support for GTK+ printing libnotify
Should wxWidgets be compiled into single library? no
Should wxWidgets be linked as a shared library? yes
Should wxWidgets support Unicode? yes (using wchar_t)
What level of wxWidgets compatibility should be enabled?
wxWidgets 2.6 no
wxWidgets 2.8 yes
Which libraries should wxWidgets use?
STL no
jpeg sys
png sys
regex builtin
tiff builtin
zlib sys
expat sys
libmspack no
sdl no
make -j3
sudo make install
On some systems you need to rebuild the library cache and make sure your new library is found everywhere in the system. Its a bit like registering a DLL in Windows. Its required on Ubuntu.
sudo ldconfig
wx-config --list
wx-config --version // e.g. yields "3.0.5"
cd samples/minimal // assumes you are still in gtk-build directory
make
./minimal
Cleaning the build folder will remove the build intermediates and so you wont be able to say re-make the samples inside the gtk-build directory.
make clean
Thank You For makeing such a Great guide! You have saved me many late nighters.