kpeter@3: /* -*- mode: C++; indent-tabs-mode: nil; -*- kpeter@3: * kpeter@3: * This file is a part of LEMON, a generic C++ optimization library. kpeter@3: * kpeter@3: * Copyright (C) 2003-2008 kpeter@3: * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport kpeter@3: * (Egervary Research Group on Combinatorial Optimization, EGRES). kpeter@3: * kpeter@3: * Permission to use, modify and distribute this software is granted kpeter@3: * provided that this copyright notice appears in all copies. For kpeter@3: * precise terms see the accompanying LICENSE file. kpeter@3: * kpeter@3: * This software is provided "AS IS" with no warranty of any kind, kpeter@3: * express or implied, and with no claim as to its suitability for any kpeter@3: * purpose. kpeter@3: * kpeter@3: */ kpeter@3: kpeter@3: /** kpeter@3: \page getting_started How to Start Using LEMON kpeter@3: kpeter@3: In this page we detail how to start using LEMON, from downloading it to kpeter@3: your computer, through the steps of installation, to showing a simple kpeter@3: "Hello World" type program that already uses LEMON. We assume that you kpeter@3: have a basic knowledge of your operating system and C++ programming kpeter@3: language. The procedure is pretty straightforward, but if you have any kpeter@3: difficulties don't hesitate to kpeter@3: ask. kpeter@3: kpeter@3: \section requirements_lemon Hardware and Software Requirements kpeter@3: kpeter@3: In LEMON we use C++ templates heavily, thus compilation takes a kpeter@3: considerable amount of time and memory. So some decent box would be kpeter@3: advantageous. But otherwise there are no special hardware requirements. kpeter@3: kpeter@3: You will need a recent C++ compiler. Our primary target is the GNU C++ kpeter@3: Compiler (g++), from version 3.3 upwards. We also checked the Intel C++ kpeter@3: Compiler (icc) and Microsoft Visual C++ .NET 2003, 2005. kpeter@3: If you want to develop with LEMON under Windows you could consider kpeter@3: using Cygwin. kpeter@3: kpeter@3: In this description we will suppose a Linux environment and GNU C++ Compiler. kpeter@3: kpeter@3: \subsection requirements_lp LP Solver Requirements kpeter@3: kpeter@3: The LEMON LP solver interface can use the GLPK (GNU Linear Programming kpeter@3: Kit), CPLEX (was tested with CPLEX 7.5) and SoPlex solver. If you want kpeter@3: to use it you will need at least one of these. See \ref configure_flags kpeter@3: how to enable these at compile time. kpeter@3: kpeter@3: \section download_lemon How to Download LEMON kpeter@3: kpeter@3: You can download LEMON from the LEMON web site: kpeter@3: https://lemon.cs.elte.hu/. kpeter@3: There you will find released versions in form of .tar.gz files. kpeter@3: If you want a developer version (for example you want to contribute in kpeter@3: developing the library LEMON) then you might want to use our Mercurial kpeter@3: repository. This case is detailed later, so from now on we suppose that kpeter@3: you downloaded a .tar.gz file. kpeter@3: kpeter@3: \section install_lemon How to Install LEMON kpeter@3: kpeter@3: In order to install LEMON you have to do the following steps. kpeter@3: kpeter@3: Download the tarball (named lemon-x.y.z.tar.gz where \c x, \c y kpeter@3: and \c z are numbers indicating the version of the library, in our example kpeter@3: we will have lemon-1.0.tar.gz) and issue the following commands: kpeter@3: kpeter@3: \verbatim kpeter@3: tar xvzf lemon-1.0.tar.gz kpeter@3: cd lemon-1.0 kpeter@3: ./configure kpeter@3: make kpeter@3: make check # This is optional, but recommended. It runs a bunch of tests. kpeter@3: make install kpeter@3: \endverbatim kpeter@3: kpeter@3: These commands install LEMON under \c /usr/local (you will kpeter@3: need root privileges to be able to install to that kpeter@3: directory). If you want to install it to some other place, then kpeter@3: pass the \c --prefix=DIRECTORY flag to ./configure, for example: kpeter@3: kpeter@3: \verbatim kpeter@3: ./configure --prefix=/home/username/lemon kpeter@3: \endverbatim kpeter@3: kpeter@3: In what follows we will assume that you were able to install to directory kpeter@3: \c /usr/local, otherwise some extra care is to be taken to use the library. kpeter@3: kpeter@3: We briefly explain these commands below. kpeter@3: kpeter@3: \verbatim kpeter@3: tar xvzf lemon-1.0.tar.gz kpeter@3: \endverbatim kpeter@3: This command untars the tar.gz file into a directory named kpeter@3: lemon-1.0. kpeter@3: kpeter@3: \verbatim kpeter@3: cd lemon-1.0 kpeter@3: \endverbatim kpeter@3: This command enters the directory. kpeter@3: kpeter@3: \verbatim kpeter@3: ./configure kpeter@3: \endverbatim kpeter@3: This command runs the configure shell script, which does some checks and kpeter@3: creates the makefiles. kpeter@3: kpeter@3: \verbatim kpeter@3: make kpeter@3: \endverbatim kpeter@3: This command compiles the non-template part of LEMON into libemon.a kpeter@3: file. It also compiles the programs in the tools and demo subdirectories kpeter@3: when enabled. kpeter@3: kpeter@3: \verbatim kpeter@3: make check kpeter@3: \endverbatim kpeter@3: This step is optional, but recommended. It runs the test programs that kpeter@3: we developed for LEMON to check whether the library works properly on kpeter@3: your platform. kpeter@3: kpeter@3: \verbatim kpeter@3: make install kpeter@3: \endverbatim kpeter@3: This command will copy the directory structure to its final destination kpeter@3: (e.g. to \c /usr/local) so that your system can access it. kpeter@3: This command should be issued as "root", unless you provided a kpeter@3: \c --prefix switch to the \c configure to install the library in kpeter@3: non-default location. kpeter@3: kpeter@3: Several other configure flags can be passed to ./configure. kpeter@3: For more information see ./configure --help and the INSTALL kpeter@3: file in the install directory. kpeter@3: kpeter@3: \section hg_checkout How to Checkout LEMON from our Mercurial Repository kpeter@3: kpeter@3: You can obtain the latest version of LEMON from our Mercurial repository. kpeter@3: To do this issue the following command: kpeter@3: \verbatim kpeter@3: hg clone http://lemon.cs.elte.hu/hg/lemon lemon-src kpeter@3: \endverbatim kpeter@3: kpeter@3: \section hg_compile How to Compile the Source from the Repository kpeter@3: kpeter@3: You can compile the code from the repository similarly to the packaged kpeter@3: version, but you will need to run autoreconf -vif or kpeter@3: ./bootstrap in some older environment before kpeter@3: ./configure. See ./configure --help for options. kpeter@3: For bootstrapping you will need the following tools: kpeter@3: kpeter@3: - automake (1.7 or newer) kpeter@3: - autoconf (2.59 or newer) kpeter@3: - libtool kpeter@3: - pkgconfig kpeter@3: kpeter@3: To generate the documentation, run make html. kpeter@3: You will need Doxygen for this. kpeter@3: kpeter@3: */