[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
1.3 Installation and usage
MathGL can be installed in 4 different ways.
-
Compile from sources. The standard script for autoconf/automake tool is included in the library beginning from version 1.2.1. To run it, one should execute 3 commands:
./configure
after itmake
andmake install
with root/sudo rights. Sometimes after installation you may need to update the library list – just executeldconfig
with root/sudo rights.Script
./configure
have several additional options which are switched off by default. They are:--enable-fltk, --enable-glut, --enable-qt
for ebabling FLTK, GLUT and/or Qt windows;--enable-jpeg, --enable-tiff, --enable-hdf5
for enabling corresponding file formats;--enable-all
for enabling all additional features. For usingdouble
as base internal data type use option--enable-double
. For enabling language interfaces use--enable-python, --enable-octave
or--enable-langall
for all languages. The full list of options can be viewed by command./configure --help
. - One can use cmake for building MathGL library if autoconf/automake tools are absent. For example, it is the typical situation for Windows, MacOS and/or using of non-GNU compilers. However the making of MathGL documentation is switched off for this case. You can use WYSIWYG tools to change cmake build options.
- Use a precompiled binary. There are binaries for MinGW (platform Win32). For a precompiled variant one needs only to unpack the archive to the location of the compiler (or in any other folder and setup paths). By default, precompiled versions include the support of GSL (www.gsl.org) and PNG. So, one needs to have these libraries installed on system (it can be found, for example, at http://gnuwin32.sourceforge.net/packages.html)..
- Install precompiled versions from standard packages (RPM, deb, DevPak and so on, see Download section at homepage).
To compile your own program, you need to specify the linker option -lmgl
for a compilation in the console program or with external (non-MathGL) window library. If you want to use FLTK or GLUT windows then you need to add the option -lmgl-fltk
or -lmgl-glut
. Fortran users also should add C++ library by the option -lstdc++
.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |