Skip to content
Search

WxWidgets

lastmod 2021-05-18created 2014-08-2978 edits

wxWidgets Classes

wxWidgets (formerly wxWindows) is a widget toolkit for building graphical user interfaces for cross-platform applications. wxWidgets lets a program's GUI code compile and run on the operating systems of many computers without special code changes. It supports operating systems such as Microsoft Windows, Mac OS X, Linux/Unix (X11, Motif, GTK+), OpenVMS, OS/2, and AmigaOS.

How to compile

Go to /build/msw in the install path and compile as follows.

mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=debug

For release mode, enter the following.

mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=release

Note that when using the compiled library, applying the -std=c++11 flag may keep it from working properly.1 In this case, use -std=gnu++11.

MinGW build

Install using mingw32-make.exe. If an error related to libiconv-2.dll occurs, copy bin/libiconv-2.dll from the directory where mingw is installed. The version of mingw32-make used is 3.82.

Makefile parameter:

  • SHARED=0: Builds static libraries.
  • SHARED=1: Builds dynamic libraries.
  • MONOLITHIC=1: Packages all libraries in a single file. (Note: do not combine this option with a static build.)
  • UNICODE=1: Builds wxWidgets with Unicode support.
  • BUILD=debug: Build the library with debug support.
  • BUILD=release: Release build of the library (with no debug support).

How to build:

  • Build a dynamic library (DLL). (single file)
    • mingw32-make -f makefile.gcc SHARED=1 MONOLITHIC=1 UNICODE=1 BUILD=release
    • mingw32-make -f makefile.gcc SHARED=1 MONOLITHIC=1 UNICODE=1 BUILD=debug
  • Build a dynamic library (DLL). (multiple files)
    • mingw32-make -f makefile.gcc SHARED=1 UNICODE=1 BUILD=release
    • mingw32-make -f makefile.gcc SHARED=1 UNICODE=1 BUILD=debug
  • Build a static library. (multiple files)
    • mingw32-make -f makefile.gcc SHARED=0 UNICODE=1 BUILD=release
    • mingw32-make -f makefile.gcc SHARED=0 UNICODE=1 BUILD=debug

Simple build:

cd /d [wsWidgets설치디렉토리]\build\msw
mingw32-make -f makefile.gcc SHARED=1 MONOLITHIC=1 UNICODE=1 BUILD=release

MacOSX compile

Go to the build-release folder and run the configure command as follows.

$ ../configure --with-osx_cocoa --with-macosx-version-min=10.8 \
    --with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk \
    --enable-unicode --enable-monolithic --prefix="$(pwd)"
  • --with-osx_cocoa: Uses the Cocoa framework. Supports 64-bit. Set this for Lion/Mountain Lion users
  • --enable-universal_binary: Supports both 32-bit and 64-bit. Recommended not to set this if the target users of the finished application are limited to Lion/Mountain Lion
  • --with-macosx-version-min=10.8: Change the trailing 10.8 to set the minimum supported OSX version
  • --with-macosx-sdk=path: Likewise, change the 10.8 at the end to set the SDK version to use. Recommended to match --with-macosx-version-min
  • --enable-unicode: Whether to use Unicode
  • --enable-monolithic: Whether to build the output as one single library. Recommended to enable if you don't want to bother with detailed settings
  • --disable-shared: Whether to build the output as a static library instead of a dynamic library. Note that it cannot be enabled together with --enable-monolithic.

To build in debug mode, add the --enable-debug option.

Libraries

WxWidgets_library_diagram.png

wxWidgets class Hierarchy

WxWidgets-Class_hierarchy.png

Category

Example

Local Download

wxWidgets 3.1.0
WxWidgets-3.1.0.tar.gz (Github source code)
Cross-Platform GUI Programming with wxWidgets
https://ptgmedia.pearsoncmg.com/images/0131473816/downloads/0131473816_book.pdf
Cross-Platform_GUI_Programming_with_wxWidgets_-_0131473816_book.pdf

See also

GUI Form Editor

Web

Favorite site

Tutorial

Guide

References


  1. Confirmed in version 3.0.2. Details can be found here. ↩

  2. Zetcode.com-170124.zip ↩

  3. WxWidgets-2.8.12-HTML.zip ↩

  4. Introduction_to_wxWidgets_-_CodeProject.pdf ↩

  5. CODEpendent-wx-sdl_tutorial_part_1.pdf ↩

  6. Wx-sdl_src.zip ↩

  7. WxWiki_-_Precompiled_Headers.pdf ↩