Difference between revisions of "Main Page"
(→Drivers) |
|||
Line 1: | Line 1: | ||
This is the (un-)official Wiki for [http://plplot.sf.net PLplot]. It should provide additional information to complement the PLplot [http://plplot.sourceforge.net/docbook-manual/ documentation]. | This is the (un-)official Wiki for [http://plplot.sf.net PLplot]. It should provide additional information to complement the PLplot [http://plplot.sourceforge.net/docbook-manual/ documentation]. | ||
+ | |||
+ | {| style="margin: 5px 0px 10px 0px;" cellpadding="0" cellspacing="0" border="0" | ||
+ | | valign="top" width="50%" style="background: #f6f6f6; border: #bbb 1px solid; padding: 0px 10px 5px 10px;" | | ||
+ | <h2>[[General Information]]</h2> | ||
+ | Language bindings, toolkit comparisons, prerequisites, FAQs, bounties, vacancies, and more... | ||
+ | | <div style="width: 10px;"></div> | ||
+ | | valign="top" width="50%" style="background: #f6f6f6; border: #bbb 1px solid; padding: 0px 10px 5px 10px;" | | ||
+ | <h2>[[Tools]]</h2> | ||
+ | Rapid application development, build management, debugging, testing, documenting, and more... | ||
+ | | <div style="width: 10px;"></div> | ||
+ | |- | ||
+ | | colspan="5" | <div style="height: 10px;"></div> | ||
+ | |- | ||
+ | | valign="top" width="50%" style="background: #f6f6f6; border: #bbb 1px solid; padding: 0px 10px 5px 10px;" | | ||
+ | <h2>[[Guides & Tutorials]]</h2> | ||
+ | Setting up your IDE, platform specific tips, installers, internationalization, executable size, XML, RTTI, networking, and more... | ||
+ | | <div style="width: 10px;"></div> | ||
+ | | valign="top" width="50%" style="background: #f6f6f6; border: #bbb 1px solid; padding: 0px 10px 5px 10px;" | | ||
+ | <h2>[[Documentation]]</h2> | ||
+ | Class specific notes and documentation (both official and contributed), functions, and macros. | ||
+ | | <div style="width: 10px;"></div> | ||
+ | |} | ||
== Building PLplot == | == Building PLplot == |
Revision as of 13:10, 22 March 2008
This is the (un-)official Wiki for PLplot. It should provide additional information to complement the PLplot documentation.
Building PLplot
With the exception of DJGPP on (Free)DOS (where you should follow the directions at sys/dos/djgpp/readme) all PLplot builds are done with our CMake-based build system which gives good results on Unix, Linux, and Mac OS X and Cygwin, MinGW, MinGW/MSYS, and bare windows.
Building PLplot with our CMake-based build system
Our CMake-based build system has been made available as part of our development releases of PLplot starting with version 5.7.0 and is now with the exception of the DJGPP platform our sole build system. It is important to consult the CMake documentation to get the most out of our build system. That documentation is quite thorough but tends to be a bit scattered so we have collected what we think are the best general CMake documentation links for your convenience.
After consulting that documentation, install the appropriate package of CMake for your system platform. Note, you must use at least version 2.4.5 of CMake for your PLplot configuration.
Generic Unix instructions for our build system
(Optional) set environment variables to help cmake find system components that are installed in non-standard locations
Here is one particular example (which must be executed before the cmake invocation discussed below).
export CMAKE_INCLUDE_PATH=/home/software/autotools/install/include:/home/software/cgmlib/cd1.3 export CMAKE_LIBRARY_PATH=/home/software/autotools/install/lib:/home/software/cgmlib/cd1.3 export PKG_CONFIG_PATH=/home/software/libLASi/install/lib/pkgconfig
For this particular example, CMAKE_INCLUDE_PATH helps cmake to find the headers for libltdl and libcd in non-standard install locations; CMAKE_LIBRARY_PATH helps cmake to find the libltdl and libcd libraries in non-standard install locations; and PKG_CONFIG_PATH helps cmake to use the pkg-config command internally to find a libLASi pkg-config module file that is installed in a non-standard location.
In general, CMAKE_INCLUDE_PATH helps cmake find headers and other files that are installed in non-standard locations; CMAKE_LIBRARY_PATH helps cmake find libraries that are installed in non-standard locations; and PKG_CONFIG_PATH helps pkg-config (either externally or internally from cmake) find pkg-config modules installed in non-standard locations. Finally, although not used in the specific example above, the colon-separated environment variable PATH helps cmake find executables that are installed in non-standard locations.
(Optional) set environment variables to specify the compilers and compiler flags
Here is one particular example (which must be executed before the cmake invocation discussed below).
export CC="gcc -O2" export CXX="g++ -O2" export FC="g77 -O2"
If you don't set the environment variables above, then by default no compiler options (i.e., no optimization and no debugging symbols) are used for gcc-related compilers for our build system which makes for fast builds, but slow execution.
cmake invocation
Here is one typical example.
mkdir build_dir cd build_dir cmake -DCMAKE_INSTALL_PREFIX=/my/prefix \ -DCMAKE_VERBOSE_MAKEFILE=ON \ ../plplot_cmake >& cmake.out
(CMake is capable of generating builds within the source tree, but we have emphasized a build with a separate build tree here because of its fundamental advantage that the source tree remains clean with no generated files in it.)
Check the cmake.out file for any configuration issues, especially WARNING messages which signal that a component of PLplot has been removed because required system components for that component have not been found.
There are a large number of CMake options for PLplot which can be set for cmake to personalize your build. Use the ccmake front end to cmake to obtain documentation of all these options. In the above case we have specified a particular install prefix "/my/prefix" and verbose make results (essential if you want to see the exact commands used for the build).
Note in the above example an empty build directory called build_dir is used to insure a clean start, and ../plplot_cmake is a freshly checked out source tree from our svn repository or the name of the source tree created when you unpacked a PLplot source distribution tarball. Note, the name "plplot_cmake" is only for this example, and the name will most likely be something else on your system.
To start a fresh build, simply execute "cd build_dir; rm -rf *" before invoking cmake. Of course, "rm -rf *" is an extremely dangerous command (since it removes everything in the current directory and all subdirectories), but you should be okay so long as you cd to the correct directory before executing the "rm" command.
Post-cmake build, install, and build-tree and install-tree tests
The PLplot build and install follows the cmake invocation. Build-tree tests may be done with the "ctest" command. Note, these ctests can only be performed if cmake is invoked with the -DBUILD_TEST=ON option (which roughly doubles the build time because all the examples must be built). The installed tree can be tested with the PLplot install-tree test for a large variety of PLplot device drivers.
Third-party libraries
The core of PLplot as well as most of the drivers depend on third-party libraries. While for the PLplot library most dependencies are optional, while drivers are not included if dependencies are not fulfilled. In the following section information about this dependencies for the various operating systems are given.
PLplot core
Drivers
- aquaterm - displays plots, available for Mac OS X
- freetype - enables use of ttf fonts for some drivers
- wxWidgets - displays plots, available for Windows, Linux, Mac OS X
- cgm - outputs cgm files
- gd - the gd driver is able to output png, jpeg and gif files
Specifics for various platforms
Mac OSX
- Mac OSX instructions
- Mac OSX Status current status
Windows
Instructions per Windows platform
- Configure PLplot for Visual CXX
- Configure PLplot for MinGW/CLI
- Configure PLplot for cygwin
- Configure PLplot for Borland CXX 5.5 (free command line tools)
- Configure PLplot for Borland Turbo C++ Explorer Edition (free IDE and compiler)
- Install 3rd party libraries
Status of our build system on Windows
Miscellaneous Debris
Edit Wiki pages
Consult the User's Guide for information on using the wiki software. More information can be found here:
Maintain Wiki
This wiki will be backed up on a regular basis. Use these BackupInstructions.
To restore a backup follow these RestoreInstructions.