Skip to content

Instantly share code, notes, and snippets.

@pemd-sys
Last active October 1, 2021 21:41
Show Gist options
  • Save pemd-sys/898c6b04c28da91bc8385a1b5d30d685 to your computer and use it in GitHub Desktop.
Save pemd-sys/898c6b04c28da91bc8385a1b5d30d685 to your computer and use it in GitHub Desktop.
wxWidgets Compiling your Code

Compiling your own wxwidgets codes

The easiest way to see if the compile paths are setup correctly is to try building one of the samples in a new directory.

mkdir ~/minimal
cd ~/minimal

Go to the samples folder of wxwidgets source files assumed to be in ~/wxWidgets-3.0.5/samples/

cp ~/wxWidgets-3.0.5/samples/minimal/ ~/minimal

Update paths

In the minimal example the code assumes that sample.xpm file is located in folder above. so we have to copy the sample.xpm file into the minimal directory and then change

#include "../sample.xpm"

to

#include "sample.xpm"

Compile the example

g++ minimal.cpp `wx-config --cxxflags --libs` -o minimal
./minimal

it should compile and run without problems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment