1 /* -*- mode: C++; indent-tabs-mode: nil; -*-
3 * This file is a part of LEMON, a generic C++ optimization library.
5 * Copyright (C) 2003-2008
6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
7 * (Egervary Research Group on Combinatorial Optimization, EGRES).
9 * Permission to use, modify and distribute this software is granted
10 * provided that this copyright notice appears in all copies. For
11 * precise terms see the accompanying LICENSE file.
13 * This software is provided "AS IS" with no warranty of any kind,
14 * express or implied, and with no claim as to its suitability for any
20 \page getting_started How to Start Using LEMON
22 In this page we detail how to start using LEMON, from downloading it to
23 your computer, through the steps of installation, to showing a simple
24 "Hello World" type program that already uses LEMON. We assume that you
25 have a basic knowledge of your operating system and C++ programming
26 language. The procedure is pretty straightforward, but if you have any
27 difficulties don't hesitate to
28 <a href="mailto:lemon-user@lemon.cs.elte.hu"><b>ask</b></a>.
30 \section requirements_lemon Hardware and Software Requirements
32 In LEMON we use C++ templates heavily, thus compilation takes a
33 considerable amount of time and memory. So some decent box would be
34 advantageous. But otherwise there are no special hardware requirements.
36 You will need a recent C++ compiler. Our primary target is the GNU C++
37 Compiler (g++), from version 3.3 upwards. We also checked the Intel C++
38 Compiler (icc) and Microsoft Visual C++ .NET 2003, 2005.
39 If you want to develop with LEMON under Windows you could consider
42 In this description we will suppose a Linux environment and GNU C++ Compiler.
44 \subsection requirements_lp LP Solver Requirements
46 The LEMON LP solver interface can use the GLPK (GNU Linear Programming
47 Kit), CPLEX (was tested with CPLEX 7.5) and SoPlex solver. If you want
48 to use it you will need at least one of these. See \ref configure_flags
49 how to enable these at compile time.
51 \section download_lemon How to Download LEMON
53 You can download LEMON from the LEMON web site:
54 <a href="http://lemon.cs.elte.hu/">https://lemon.cs.elte.hu/</a>.
55 There you will find released versions in form of <tt>.tar.gz</tt> files.
56 If you want a developer version (for example you want to contribute in
57 developing the library LEMON) then you might want to use our Mercurial
58 repository. This case is detailed later, so from now on we suppose that
59 you downloaded a <tt>.tar.gz</tt> file.
61 \section install_lemon How to Install LEMON
63 In order to install LEMON you have to do the following steps.
65 Download the tarball (named <tt>lemon-x.y.z.tar.gz</tt> where \c x, \c y
66 and \c z are numbers indicating the version of the library, in our example
67 we will have <tt>lemon-1.0.tar.gz</tt>) and issue the following commands:
70 tar xvzf lemon-1.0.tar.gz
74 make check # This is optional, but recommended. It runs a bunch of tests.
78 These commands install LEMON under \c /usr/local (you will
79 need root privileges to be able to install to that
80 directory). If you want to install it to some other place, then
81 pass the \c --prefix=DIRECTORY flag to <tt>./configure</tt>, for example:
84 ./configure --prefix=/home/username/lemon
87 In what follows we will assume that you were able to install to directory
88 \c /usr/local, otherwise some extra care is to be taken to use the library.
90 We briefly explain these commands below.
93 tar xvzf lemon-1.0.tar.gz
95 This command untars the <tt>tar.gz</tt> file into a directory named
101 This command enters the directory.
106 This command runs the configure shell script, which does some checks and
107 creates the makefiles.
112 This command compiles the non-template part of LEMON into <tt>libemon.a</tt>
113 file. It also compiles the programs in the tools and demo subdirectories
119 This step is optional, but recommended. It runs the test programs that
120 we developed for LEMON to check whether the library works properly on
126 This command will copy the directory structure to its final destination
127 (e.g. to \c /usr/local) so that your system can access it.
128 This command should be issued as "root", unless you provided a
129 \c --prefix switch to the \c configure to install the library in
130 non-default location.
132 Several other configure flags can be passed to <tt>./configure</tt>.
133 For more information see <tt>./configure --help</tt> and the INSTALL
134 file in the install directory.
136 \section hg_checkout How to Checkout LEMON from our Mercurial Repository
138 You can obtain the latest version of LEMON from our Mercurial repository.
139 To do this issue the following command:
141 hg clone http://lemon.cs.elte.hu/hg/lemon lemon-src
144 \section hg_compile How to Compile the Source from the Repository
146 You can compile the code from the repository similarly to the packaged
147 version, but you will need to run <b><tt>autoreconf -vif</tt></b> or
148 <b><tt>./bootstrap</tt></b> in some older environment before
149 <tt>./configure</tt>. See <tt>./configure --help</tt> for options.
150 For bootstrapping you will need the following tools:
152 - <a href="http://www.gnu.org/software/automake/">automake</a> (1.7 or newer)
153 - <a href="http://www.gnu.org/software/autoconf/">autoconf</a> (2.59 or newer)
154 - <a href="http://www.gnu.org/software/libtool/">libtool</a>
155 - <a href="http://pkgconfig.freedesktop.org/">pkgconfig</a>
157 To generate the documentation, run <tt>make html</tt>.
158 You will need <a href="http://www.doxygen.org/">Doxygen</a> for this.