wxWidgets is a cross platform GUI toolkit which also provides other common classes as wxString, wxMap etc. and is known to work well on Windows, Linux and Mac OS X. The wxWidgets toolkit is used for the wxWidgets driver. Version 2.6.x and 2.8.x of wxWidgets can be used for the wxWidgets driver. Go to http://www.wxwidgets.org for more information.
The wxWidgets library version 2.8.4 is already installed on Mac OS X 10.5.1 and later. This version is known to work well with the wxWidgets driver, therefore just run cmake as described on the Mac OSX Page. The wxWidgets library should be discovered automatically. This can be checked at the end of the cmake output:
Language Bindings:
ENABLE_f77: OFF ENABLE_f95: OFF
ENABLE_cxx: ON ENABLE_java: ON
ENABLE_python: ON ENABLE_octave: OFF
ENABLE_tcl: ON ENABLE_itcl: OFF
ENABLE_tk: ON ENABLE_itk: OFF
ENABLE_pdl: OFF ENABLE_wxwidgets: ON
ENABLE_gnome2: OFF ENABLE_pygcw: OFF
ENABLE_ada: OFF
The simplest way to install the wxWidgets (wxGTK) library and development files is to install the corresponding packages for your distribution, e.g. in Ubuntu Hardy Heron install the libwxgtk2.8-dev package, which dependes on libwxbase2.8-0, libwxbase2.8-dev, libwxgtk2.8-0 and wx2.8-headers.
set WXWIN=C:\wxWidgets-2.8.9
cd %WXWIN%\build\msw
mingw32-make -f makefile.gcc SHARED=1 UNICODE=1 BUILD=release
set PATH=%WXWIN%\lib\gcc_dll;%PATH%
CMake is now able to find the wxWidgets library and headers, if you additionally set the following cmake options for MinGW:
-DwxWidgets_LIB_DIR=%WXWIN%/lib/gcc_dll -DwxWidgets_CONFIGURATION=mswu -DENABLE_MIX_CXX=ON
CAUTION: If you have used other guides to compile wxWidgets (Eclipse, CDT & MingW & MSYS Setup Guide in my case), be aware that there is a significant difference between having compiled wxWidgets with ./configure in MSYS and the above commands using CMake. Although both result in Windows libraries, they will not place them in the same paths. The location of build.cfg may also be a significant factor. CMake, as is used by PLplot, can search for wxWidgets via two independent methods labeled 'unix' and 'win32'. The ./configure method is not compatible with the 'win32' search method.
cd %WXWIN%\build\msw
nmake -f makefile.vc SHARED=1 UNICODE=1 BUILD=release USE_GDIPLUS=1
This builds a shared, unicode release library of wxWidgets with GDI+ support for wxGraphicsContext included.
#define wxUSE_GRAPHICS_CONTEXT 0
to
#define wxUSE_GRAPHICS_CONTEXT 1
set PATH=%WXWIN%\lib\vc_dll;%PATH%
-DwxWidgets_LIB_DIR=%WXWIN%/lib/vc_dll -DwxWidgets_CONFIGURATION=mswu -DENABLE_MIX_CXX=ON
The content of this page is available under the GNU Free Documentation License 1.2.