Configure PLplot for cygwin

From PLplotWiki
Revision as of 09:39, 11 July 2008 by Chm-on-plplot-wiki (Talk | contribs) (Added / to . and .. dirnames for visibility)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

You need a working cygwin installation. Start cygwin and issue the following commands:

cd plplot
mkdir buildcygwin
cd buildcygwin
cmake -DCMAKE_INSTALL_PREFIX=install -DENABLE_tk=OFF -DENABLE_tcl=OFF ../
make
make install

This will build a shared plplot library and install all files into the directory plplot\buildcygwin\install. Tk bindings and driver need to be disabled (-DENABLE_tk=OFF), since they won't compile on cygwin at the moment. The following options are available for cmake:

  • -DCMAKE_VERBOSE_MAKEFILE=ON: makefiles provide verbose informations
  • -DBUILD_TEST=ON: all examples will be built also (for test purposes)

If you used the -DBUILD_TEST=ON option, you need to copy some files in order to run the examples:

cd examples/c
cp ../../../data/*.fnt ./

The Cygwin platform allows both shared libraries and dynamic drivers, making it almost equivalent to a regular Linux platform in this respect. However:

  • The shared libraries will be installed in the bin directory, not in the lib directory, in accordance with the Windows conventions
  • They have the extension .dll instead of .so
  • For the Fortran 77 and Fortran 95 bindings the plparseopts routine does not work yet. This is due to the properties of the available compilers.
  • If the PATH environment variable gives access to native Windows compilers before the Cygwin-specific compilers, you need to either reset the PATH variable or specify the Cygwin-specific compilers explicitly.
  • It may be necessary to add the path to the X Window libraries explicitly:
export PATH="/usr/X11R6/bin:$PATH"

Note on Tcl:

You may need to set the TCL_LIBRARY and PL_LIBRARY environment variable:

export TCL_LIBRARY=/usr/share/tcl8.4

and:

export PL_LIBRARY=path to plplot.tcl

(Unfortunately the Tk bindings currently rely on UNIX/Linux-only facilities, so that they do not compile on Cygwin)