WxWidgets

From PLplotWiki
Revision as of 22:53, 22 October 2008 by Smekal (Talk | contribs) (Added linux instructions.)

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. Go 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

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 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 Linux

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.

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.

MinGW command line tools

  • To compile wxWidgets with the MinGW compiler run
cd %WXWIN%\build\msw
mingw32-make -f makefile.gcc SHARED=1 UNICODE=1 BUILD=release
  • set environment variables
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

VisualC command line tools

  • To compile wxWidgets with the Visual C++ command line toolset run
cd %WXWIN%\build\msw
nmake -f makefile.vc SHARED=1 UNICODE=1 BUILD=release
  • set environment variables (Visual C++)
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 Visual C++:
 -DwxWidgets_LIB_DIR=%WXWIN%/lib/vc_dll -DwxWidgets_CONFIGURATION=mswu -DENABLE_MIX_CXX=ON