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 getting_started How to Start Using LEMON |
---|
21 | |
---|
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>. |
---|
29 | |
---|
30 | \section requirements_lemon Hardware and Software Requirements |
---|
31 | |
---|
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. |
---|
35 | |
---|
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 |
---|
40 | using Cygwin. |
---|
41 | |
---|
42 | In this description we will suppose a Linux environment and GNU C++ Compiler. |
---|
43 | |
---|
44 | \subsection requirements_lp LP Solver Requirements |
---|
45 | |
---|
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. |
---|
50 | |
---|
51 | \section download_lemon How to Download LEMON |
---|
52 | |
---|
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. |
---|
60 | |
---|
61 | \section install_lemon How to Install LEMON |
---|
62 | |
---|
63 | In order to install LEMON you have to do the following steps. |
---|
64 | |
---|
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: |
---|
68 | |
---|
69 | \verbatim |
---|
70 | tar xvzf lemon-1.0.tar.gz |
---|
71 | cd lemon-1.0 |
---|
72 | ./configure |
---|
73 | make |
---|
74 | make check # This is optional, but recommended. It runs a bunch of tests. |
---|
75 | make install |
---|
76 | \endverbatim |
---|
77 | |
---|
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: |
---|
82 | |
---|
83 | \verbatim |
---|
84 | ./configure --prefix=/home/username/lemon |
---|
85 | \endverbatim |
---|
86 | |
---|
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. |
---|
89 | |
---|
90 | We briefly explain these commands below. |
---|
91 | |
---|
92 | \verbatim |
---|
93 | tar xvzf lemon-1.0.tar.gz |
---|
94 | \endverbatim |
---|
95 | This command untars the <tt>tar.gz</tt> file into a directory named |
---|
96 | <tt>lemon-1.0</tt>. |
---|
97 | |
---|
98 | \verbatim |
---|
99 | cd lemon-1.0 |
---|
100 | \endverbatim |
---|
101 | This command enters the directory. |
---|
102 | |
---|
103 | \verbatim |
---|
104 | ./configure |
---|
105 | \endverbatim |
---|
106 | This command runs the configure shell script, which does some checks and |
---|
107 | creates the makefiles. |
---|
108 | |
---|
109 | \verbatim |
---|
110 | make |
---|
111 | \endverbatim |
---|
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 |
---|
114 | when enabled. |
---|
115 | |
---|
116 | \verbatim |
---|
117 | make check |
---|
118 | \endverbatim |
---|
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 |
---|
121 | your platform. |
---|
122 | |
---|
123 | \verbatim |
---|
124 | make install |
---|
125 | \endverbatim |
---|
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. |
---|
131 | |
---|
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. |
---|
135 | |
---|
136 | \section hg_checkout How to Checkout LEMON from our Mercurial Repository |
---|
137 | |
---|
138 | You can obtain the latest version of LEMON from our Mercurial repository. |
---|
139 | To do this issue the following command: |
---|
140 | \verbatim |
---|
141 | hg clone http://lemon.cs.elte.hu/hg/lemon lemon-src |
---|
142 | \endverbatim |
---|
143 | |
---|
144 | \section hg_compile How to Compile the Source from the Repository |
---|
145 | |
---|
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: |
---|
151 | |
---|
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> |
---|
156 | |
---|
157 | To generate the documentation, run <tt>make html</tt>. |
---|
158 | You will need <a href="http://www.doxygen.org/">Doxygen</a> for this. |
---|
159 | |
---|
160 | */ |
---|