Building the Projects - Ravbug/wxWidgetsTemplate GitHub Wiki

Follow these instructions if you downloaded a fresh copy of the project, or you changed the wxWidgets version. These instructions show you how to compile the projects so you can start using them.

If the builds refuse to work, even though you followed all the instructions, then install a fresh copy of wxWidgets to the project folder. See this wiki page for instructions.

macOS

  1. Open mac.xcodeproj in Xcode.
  2. Select AppStatic or AppDynamic from the target selector.
  3. Press Build (cmd + b). Everything will compile in one step.

Windows

Current instructions

  1. Open windows.sln in Visual Studio.
  2. Select the configuration that you want to build
  3. Press the green compile and run button, or go to Build -> Build Solution

Legacy instructions (pre 9/27/19)

  1. Open wxWidgets\build\msw\ and find the SLN that most closely matches your Visual Studio version. For example, open wx_vc15.sln if you are using Visual Studio 2015 or later.
  2. Select the configuration (example: Debug x86), and press Build -> Build Solution (ctrl + shift + B).
  3. Repeat step 2 for each configuration you want to use. I recommend compiling Debug and Release for x64 at the very least.
    • Alternatively, to build all the possible configurations, go to Build → Batch Build, Select All, and press Build,
  4. In the template root folder, open windows.sln in the template root, select your configuration, and build (or build and run).

Linux

  1. Ensure you have the required dependencies. If you do not have them, the setup will fail (but it will tell you which one you are missing). Commonly missing packages:
    • autoconf
    • g++ (or another C++ compiler like clang++)
    • gtk3 development package
    • make
    • If you install a library but the setup still fails, try installing the development version of the package.
  2. Open a shell window in the template folder root.
  3. Run make run. This will compile the library, the sample, and launch it. The object files and the executable will be located inside linux-build/ which is created when you compile for the first time. The library files will be located inside wxWidgets/build/linux.
    • To make a Dynamic build, add Dynamic=1 to your command: make run Dynamic=1
    • To pass additional wxWidgets compilation arguments, add them as an assignment: make run WXFLAGS=--with-opengl, or edit the WXFLAGS assignment in the makefile.

Additional Linux setup guide: https://wiki.wxwidgets.org/Compiling_and_getting_started

Additional help

See the official wxWidgets installation help page here: https://wiki.wxwidgets.org/Install