Changeset 7:934258c64b6b in lemon-tutorial
- Timestamp:
- 10/24/08 14:26:15 (16 years ago)
- Branch:
- default
- Phase:
- public
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
getting_started.dox
r6 r7 19 19 /** 20 20 \page getting_started Getting Started 21 22 In this page we detail how to start using LEMON, from downloading it to23 your computer, through the steps of installation, to showing a simple24 "Hello World" type program that already uses LEMON. We assume that you25 have a basic knowledge of your operating system and C++ programming26 language. The procedure is pretty straightforward, but if you have any27 difficulties do not hesitate to28 <a href="mailto:lemon-user@lemon.cs.elte.hu"><b>ask</b></a>.29 30 \section requirements_lemon Hardware and Software Requirements31 32 In LEMON we use C++ templates heavily, thus compilation takes a33 considerable amount of time and memory. So some decent box would be34 advantageousm, 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++ (on Windows).39 If you want to develop with LEMON under Windows, you can use a Windows40 installer or you can consider using Cygwin.41 42 In this description we will suppose a Linux environment and GNU C++ Compiler.43 If you would like to develop under Windows and use a Windows installer,44 you could skip the following sections and continue reading \ref hello_lemon.45 However keep in mind that you have to make appropriate steps instead of46 the instructions detailed here to be able to compile the example code47 with your compiler.48 49 \subsection requirements_lp LP Solver Requirements50 51 The LEMON LP solver interface can use the GLPK (GNU Linear Programming52 Kit), CPLEX and SoPlex solver. If you want to use it, you will need at53 least one of these.54 See the <b><tt>INSTALL</tt></b> file how to enable these at compile time.55 56 \section download_lemon How to Download LEMON57 58 You can download LEMON from our web site:59 <a href="http://lemon.cs.elte.hu/">http://lemon.cs.elte.hu/</a>.60 There you will find released versions in form of <tt>.tar.gz</tt> files61 (and Windows installers).62 If you want a developer version (for example you want to contribute in63 developing LEMON) then you might want to use our Mercurial repository.64 This case is detailed \ref hg_checkout "later", so from now on we65 suppose that you downloaded a <tt>.tar.gz</tt> file.66 67 \section install_lemon How to Install LEMON68 69 In order to install LEMON you have to do the following steps.70 71 Download the tarball (named <tt>lemon-x.y.z.tar.gz</tt> where \c x, \c y72 and \c z are numbers indicating the version of the library, in our example73 we will have <tt>lemon-1.0.tar.gz</tt>) and issue the following commands:74 75 \verbatim76 tar xvzf lemon-1.0.tar.gz77 cd lemon-1.078 ./configure79 make80 make check # This is optional, but recommended. It runs a bunch of tests.81 make install82 \endverbatim83 84 These commands install LEMON under \c /usr/local (you will85 need root privileges to be able to install to that86 directory). If you want to install it to some other place, then87 pass the \c --prefix=DIRECTORY flag to <tt>./configure</tt>, for example:88 89 \verbatim90 ./configure --prefix=/home/username/lemon91 \endverbatim92 93 In what follows we will assume that you were able to install to directory94 \c /usr/local, otherwise some extra care is to be taken to use the library.95 96 We briefly explain these commands below.97 98 \verbatim99 tar xvzf lemon-1.0.tar.gz100 \endverbatim101 This command untars the <tt>tar.gz</tt> file into a directory named102 <tt>lemon-1.0</tt>.103 104 \verbatim105 cd lemon-1.0106 \endverbatim107 This command enters the directory.108 109 \verbatim110 ./configure111 \endverbatim112 This command runs the configure shell script, which does some checks and113 creates the makefiles.114 115 \verbatim116 make117 \endverbatim118 This command compiles the non-template part of LEMON into <tt>libemon.a</tt>119 file. It also compiles the programs in the tools and demo subdirectories120 when enabled.121 122 \verbatim123 make check124 \endverbatim125 This step is optional, but recommended. It runs the test programs that126 have been developed for LEMON to check whether the library works properly on127 your platform.128 129 \verbatim130 make install131 \endverbatim132 This command will copy the directory structure to its final destination133 (e.g. to \c /usr/local) so that your system can access it.134 This command should be issued as "root", unless you provided a135 \c --prefix switch to the \c configure to install the library in136 non-default location.137 138 Several other configure flags can be passed to <tt>./configure</tt>.139 For more information see the <b><tt>INSTALL</tt></b> file.140 141 \section hg_checkout How to Checkout LEMON from our Mercurial Repository142 143 You can obtain the latest (developer) version of LEMON from our Mercurial144 repository. To do this issue the following command.145 \verbatim146 hg clone http://lemon.cs.elte.hu/hg/lemon-main lemon-src147 \endverbatim148 149 \section hg_compile How to Compile the Source from the Repository150 151 You can compile the code from the repository similarly to the packaged152 version, but you will need to run <b><tt>autoreconf -vif</tt></b>153 (or <b><tt>./bootstrap</tt></b> in some older environment) before154 <tt>./configure</tt>. See <tt>./configure --help</tt> for options.155 For bootstrapping you will need the following tools:156 157 - <a href="http://www.gnu.org/software/automake/">automake</a> (1.7 or newer)158 - <a href="http://www.gnu.org/software/autoconf/">autoconf</a> (2.59 or newer)159 - <a href="http://www.gnu.org/software/libtool/">libtool</a>160 - <a href="http://pkgconfig.freedesktop.org/">pkgconfig</a>161 162 To generate the documentation, run <tt>make html</tt>.163 You will need <a href="http://www.doxygen.org/">Doxygen</a> for this.164 21 165 22 \section hello_lemon Compile Your First Code -
mainpage.dox
r4 r7 25 25 - \ref intro 26 26 - \ref getting_started 27 - \ref requirements_lemon28 - \ref requirements_lp29 - \ref download_lemon30 - \ref install_lemon31 - \ref hg_checkout32 - \ref hg_compile33 27 - \ref hello_lemon 34 - \ref hello_lemon_system35 - \ref hello_lemon_user36 28 - \ref basic_concepts "Basic Concepts" 37 29 - \ref digraph_build "Build and Modify a Digraph" … … 64 56 - \ref lp_maxflow "Maximum Flow as LP Problem" 65 57 - \ref appendix "Appendix" 66 - \ref install "Install LEMON" 67 - \ref install_system "Install System Wide" 68 - \ref install_system_source "From Source" 69 - \ref install_system_rpm "From rpm" 58 - \ref install 59 - \ref requirements_lemon 60 - \ref requirements_lp 61 - \ref install_from_source 62 - \ref install_system_rpm "From rpm" 70 63 - \ref install_user "Install Locally to the User" 71 64
Note: See TracChangeset
for help on using the changeset viewer.