Windows Setup

In this tutorial we show how to start writing applications with wxWidgets @Html.InsertReference("wxWidgets Home Page", "", "").


The wxWidgets framework is made of set of C++ header files and libraries. Precompiled versions of the libraries exist for some platforms but the recommended way to set up the wxWidgets framework is to compile the libraries yourself. This is the method we will show here.

The precompiled libraries and the source code are available from the @Html.InsertReferenceWithTitle("wxWidgets download page", "", "").

Setup on Windows for Visual Studio

As of January 2015 the latest stable release is 3.0.2. We will assume that the source code archive for 3.0.2 has been unpacked in C:\wxWidgets-3.0.2.

wxWidgets provides project files for most of the Visual Studio versions. They are located in C:\wxWidgets-3.0.2\build\msw and the source files are located in C:\wxWidgets-3.0.2\src. In this page we will be using Visual Studio 2013 so we load the corresponding project file: C:\wxWidgets-3.0.2\build\msw\wx_vc12.sln.

Four build configurations are defined in each project file: Debug, Release, DLL Debug and DLL Release. The Debug and Release configurations build a static version of the wxWidgets libraries while the DLL Debug and DLL Release configurations build the wxWidgets as DLLs. @Html.Info("Both the static and dynamic configurations use the DLL version of the C++ runtime library. The choice of configuration only determines" + " whether the wxWidgets code itself is linked into a static library or a DLL.")

In this tutorial the examples will use the static libraries so we build the Debug and Release configurations. The build puts the header files into C:\wxWidgets-3.0.2\include and the libraries in C:\wxWidgets-3.0.2\lib\vc_lib.