WxWidgets

From PLplotWiki
Revision as of 03:55, 9 October 2008 by Smekal (Talk | contribs) (Update for wxMSW 2.8.9)

Jump to: navigation, search

Description

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. Surf to http://www.wxwidgets.org for more information. The display quality can be enhanced by additionally compile the Freetype library and the AGG library into the driver.

Instructions for Mac OS X

Mac OS X 10.5.1

The wxWidgets library version 2.8.4 is already installed on Mac OS X 10.5.1. This version is known to work well with the wxWidgets driver, therefore just run cmake as described on the Main 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

Instructions for Windows

  • Download wxWidgets 2.8.9 library as zip (exe installer is also available)
  • Unzip the wxMSW-2.8.9.zip package in a suitable place
  • Set the WXWIN environment variable (either system wide or only for your CLI session), e.g.
set WXWIN=C:\wxWidgets-2.8.9
  • The following instructions will build a shared, unicode, release version of wxWidgets. If you use plplot within your wxWidgets application you have already a wxWidgets library ready for use - see cmake-path\share\modules\FindwxWidgets.cmake for the options for your special wxWidgets library.
  • Then for MinGW:
cd %WXWIN%\build\msw
mingw32-make -f makefile.gcc SHARED=1 UNICODE=1 BUILD=release
  • set environment variables (MinGW)
set PATH=%WXWIN%\lib\gcc_dll;%PATH%
  • Or for Visual C++:
nmake -f makefile.vc SHARED=0 UNICODE=1 BUILD=release
  • set environment variables (Visual C++)
set WXWIN=C:\wxWidgets-2.6.3
set PATH=%WXWIN%\lib\vc_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

and for Visual C++:

 -DwxWidgets_LIB_DIR=%WXWIN%/lib/vc_dll -DwxWidgets_CONFIGURATION=mswu -DENABLE_MIX_CXX=ON