COIN-OR::LEMON - Graph Library

source: lemon-tutorial/install.dox @ 7:934258c64b6b

Last change on this file since 7:934258c64b6b was 7:934258c64b6b, checked in by Alpar Juttner <alpar@…>, 16 years ago

Rework installation part and move it to the appendix

File size: 6.3 KB
Line 
1/* -*- mode: C++; indent-tabs-mode: nil; -*-
2 *
3 * This file is a part of LEMON, a generic C++ optimization library.
4 *
5 * Copyright (C) 2003-2008
6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
7 * (Egervary Research Group on Combinatorial Optimization, EGRES).
8 *
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.
12 *
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
15 * purpose.
16 *
17 */
18
19/**
20\page install Installation Guide
21
22In this page we detail how to start using LEMON, from downloading it to
23your computer, through the steps of installation, to showing a simple
24"Hello World" type program that already uses LEMON. We assume that you
25have a basic knowledge of your operating system and C++ programming
26language. The procedure is pretty straightforward, but if you have any
27difficulties do not hesitate to
28<a href="mailto:lemon-user@lemon.cs.elte.hu"><b>ask</b></a>.
29
30\section requirements_lemon Hardware and Software Requirements
31
32In LEMON we use C++ templates heavily, thus compilation takes a
33considerable amount of time and memory. So some decent box would be
34advantageousm, but otherwise there are no special hardware requirements.
35
36You will need a recent C++ compiler. Our primary target is the GNU C++
37Compiler (g++), from version 3.3 upwards. We also checked the Intel C++
38Compiler (icc) and Microsoft Visual C++ (on Windows).
39If you want to develop with LEMON under Windows, you can use a Windows
40installer or you can consider using Cygwin.
41
42In this description we will suppose a Linux environment and GNU C++ Compiler.
43If you would like to develop under Windows and use a Windows installer,
44you could skip the following sections and continue reading \ref hello_lemon.
45However keep in mind that you have to make appropriate steps instead of
46the instructions detailed here to be able to compile the example code
47with your compiler.
48
49\subsection requirements_lp LP Solver Requirements
50
51The LEMON LP solver interface can use the GLPK (GNU Linear Programming
52Kit), CPLEX and SoPlex solver. If you want to use it, you will need at
53least one of these.
54See the <b><tt>INSTALL</tt></b> file how to enable these at compile time.
55
56\section install_from_source Install from Source
57
58You can download LEMON from the web site:
59<a href="http://lemon.cs.elte.hu/">http://lemon.cs.elte.hu/</a>.
60There you will find released versions in form of <tt>.tar.gz</tt> files
61(and Windows installers).
62If you want a developer version (for example you want to contribute in
63developing LEMON) then you might want to use our Mercurial repository.
64This case is detailed \ref hg_checkout "later", so from now on we
65suppose that you downloaded a <tt>.tar.gz</tt> file.
66
67Thus you have to do the following steps.
68
69Download the tarball either from the browser or just issuing
70
71\verbatim
72wget http://lemon.cs.elte.hu/pub/sources/lemon-1.0.tar.gz
73\endverbatim
74
75\note The tarball is named <tt>lemon-x.y.z.tar.gz</tt> where \c x, \c
76y and \c z (which is missing if it is 0) are numbers indicating the
77version of the library, in our example we will have
78<tt>lemon-1.0.tar.gz</tt>.
79
80Then issue the following commands:
81
82\verbatim
83tar xvzf lemon-1.0.tar.gz
84cd lemon-1.0
85./configure
86make
87make check    # This is optional, but recommended. It runs a bunch of tests.
88make install
89\endverbatim
90
91These commands install LEMON under \c /usr/local (you will
92need root privileges to be able to install to that
93directory). If you want to install it to some other place, then
94pass the \c --prefix=DIRECTORY flag to <tt>./configure</tt>, for example:
95
96\verbatim
97./configure --prefix=/home/username/lemon
98\endverbatim
99
100In what follows we will assume that you were able to install to directory
101\c /usr/local, otherwise some extra care is to be taken to use the library.
102
103We briefly explain these commands below.
104
105\verbatim
106tar xvzf lemon-1.0.tar.gz
107\endverbatim
108This command untars the <tt>tar.gz</tt> file into a directory named
109<tt>lemon-1.0</tt>.
110
111\verbatim
112cd lemon-1.0
113\endverbatim
114This command enters the directory.
115
116\verbatim
117./configure
118\endverbatim
119This command runs the configure shell script, which does some checks and
120creates the makefiles.
121
122\verbatim
123make
124\endverbatim
125This command compiles the non-template part of LEMON into <tt>libemon.a</tt>
126file. It also compiles the programs in the tools and demo subdirectories
127when enabled.
128
129\verbatim
130make check
131\endverbatim
132This step is optional, but recommended. It performes a bunch of library
133self-tests.
134
135\verbatim
136make install
137\endverbatim
138This command will copy the directory structure to its final destination
139(e.g. to \c /usr/local) so that your system can access it.
140This command should be issued as "root", unless you provided a
141\c --prefix switch to the \c configure to install the library in
142non-default location.
143
144Several other configure flags can be passed to <tt>./configure</tt>.
145For more information see the <b><tt>INSTALL</tt></b> file.
146
147\subsection install_hg Install the latest development version
148
149You can also use the latest (developer) version of LEMON from our Mercurial
150repository. You need a couple additional tool for that
151
152- <a href="http://www.selenic.com/mercurial">Mercurial</a>
153  - for obtaining the latest code (and for contributing into it)
154- <a href="http://www.gnu.org/software/automake/">automake</a> (1.7 or newer)
155- <a href="http://www.gnu.org/software/autoconf/">autoconf</a> (2.59 or newer)
156- <a href="http://www.gnu.org/software/libtool/">libtool</a>
157- <a href="http://pkgconfig.freedesktop.org/">pkgconfig</a>
158  - for initializing the build framework
159- <a href="http://doxygen.org">Doxygen</a>
160  - for generating the documentations (optional, but recommended)
161
162Once you have all these tools installed, the process is fairly easy.
163First, you have to get the copy of the lates version.
164
165\verbatim
166hg clone http://lemon.cs.elte.hu/hg/lemon-main lemon-src
167\endverbatim
168
169The next step is to initialize the build system.
170
171\verbatim
172autoreconf -vif
173\endverbatim
174
175Then the process is the same as in case of using the release tarball.
176
177\verbatim
178./configure
179make
180make check    # This is optional, but recommended. It runs a bunch of tests.
181make install
182\endverbatim
183
184To generate the documentation, just run
185\verbatim
186make html
187\endverbatim
188
189*/
Note: See TracBrowser for help on using the repository browser.