# HG changeset patch # User Peter Kovacs # Date 1225216470 -3600 # Node ID a48bf0d3a790aceadf1bb1e309b63a3c6d70098d # Parent 4b3d55acc9d76963c8d51836544777ab563dd498 Extend installation guide + reorganize the toc diff -r 4b3d55acc9d7 -r a48bf0d3a790 getting_started.dox --- a/getting_started.dox Fri Oct 24 13:34:04 2008 +0100 +++ b/getting_started.dox Tue Oct 28 18:54:30 2008 +0100 @@ -17,9 +17,7 @@ */ /** -\page getting_started Getting Started - -\section hello_lemon Compile Your First Code +\page hello_lemon Compile Your First Code If you have installed LEMON on your system you can paste the following code segment into a file called hello_lemon.cc to have a first @@ -30,7 +28,7 @@ \until } First let us briefly explain how this example program works. -(The used notions will be discussed in detail in the following chapter.) +(The used notions will be discussed in detail in the following sections.) After some convenience typedefs we create a directed graph (\e digraph) and add some nodes and arcs to it. @@ -52,17 +50,17 @@ an \c int value (length) to each arc, and we set this value for each arc. Finally we iterate through all arcs again and print their lengths. -Now let's compile this simple example program. +Now let us compile this simple example program. -\subsection hello_lemon_system If LEMON is Installed System-Wide +\section hello_lemon_system If LEMON is Installed System-Wide -If your installation of LEMON into directory \c /usr/local was -successful, then it is very easy to compile this program with the +If LEMON is installed system-wide (into directory \c /usr/local), +then it is very easy to compile this program with the following command (the argument -lemon tells the compiler that we are using the installed LEMON): \verbatim -g++ hello_lemon.cc -o hello_lemon -lemon +g++ -lemon hello_lemon.cc -o hello_lemon \endverbatim As a result you will get the exacutable \c hello_lemon in the current @@ -72,7 +70,7 @@ ./hello_lemon \endverbatim -\subsection hello_lemon_user If LEMON is Installed User-Local +\section hello_lemon_user If LEMON is Installed User-Local Compiling the code is a bit more difficult if you installed LEMON user-local into a directory (e.g. ~/lemon) or if you just @@ -80,13 +78,9 @@ You have to issue a command like this. \verbatim -g++ -I ~/lemon hello_lemon.cc -o hello_lemon -lemon -L ~/lemon/lemon/.libs +g++ -lemon -I ~/lemon -L ~/lemon/lemon/.libs hello_lemon.cc -o hello_lemon \endverbatim -\subsubsection hello_lemon_pkg_config Use pkg-config - -\todo Write this sub-subsection (\ref hello_lemon_pkg_config). - If everything has gone well, then our program prints out the followings. \verbatim diff -r 4b3d55acc9d7 -r a48bf0d3a790 install.dox --- a/install.dox Fri Oct 24 13:34:04 2008 +0100 +++ b/install.dox Tue Oct 28 18:54:30 2008 +0100 @@ -19,9 +19,9 @@ /** \page install Installation Guide -In this page we detail how to start using LEMON, from downloading it to -your computer, through the steps of installation, to showing a simple -"Hello World" type program that already uses LEMON. We assume that you +In this section we detail how to start using LEMON, from downloading it +to your computer, through the steps of installation, to showing how to +compile programs that use LEMON. We assume that you have a basic knowledge of your operating system and C++ programming language. The procedure is pretty straightforward, but if you have any difficulties do not hesitate to @@ -41,10 +41,10 @@ In this description we will suppose a Linux environment and GNU C++ Compiler. If you would like to develop under Windows and use a Windows installer, -you could skip the following sections and continue reading \ref hello_lemon. +you could skip the following sections and continue reading +\ref basic_concepts. However keep in mind that you have to make appropriate steps instead of -the instructions detailed here to be able to compile the example code -with your compiler. +the instructions detailed here to be able to use LEMON with your compiler. \subsection requirements_lp LP Solver Requirements @@ -97,9 +97,6 @@ ./configure --prefix=/home/username/lemon \endverbatim -In what follows we will assume that you were able to install to directory -\c /usr/local, otherwise some extra care is to be taken to use the library. - We briefly explain these commands below. \verbatim @@ -144,10 +141,10 @@ Several other configure flags can be passed to ./configure. For more information see the INSTALL file. -\subsection install_hg Install the latest development version +\subsection install_hg Install the Latest Development Version You can also use the latest (developer) version of LEMON from our Mercurial -repository. You need a couple additional tool for that +repository. You need a couple additional tool for that. - Mercurial - for obtaining the latest code (and for contributing into it) @@ -160,7 +157,7 @@ - for generating the documentations (optional, but recommended) Once you have all these tools installed, the process is fairly easy. -First, you have to get the copy of the lates version. +First, you have to get the copy of the latest version. \verbatim hg clone http://lemon.cs.elte.hu/hg/lemon-main lemon-src @@ -181,9 +178,55 @@ make install \endverbatim -To generate the documentation, just run +To generate the documentation, just run \verbatim make html \endverbatim +\todo Is make html really necessary after +make install? + + +\section install_rpm Install from rpm + +\todo Write this section (\ref install_rpm). + + +\section install_user Install Locally to the User + +\todo Write this section (\ref install_user). + + +\section compile_codes Compile Codes that Use LEMON + +Now let us see how to use the library after installing it. + +\subsection compile_system_wide If LEMON is Installed System-Wide + +If your installation of LEMON into directory \c /usr/local was +successful, then you have to issue a command like this to compile a +source file that uses LEMON. + +\verbatim +g++ -lemon [other options] +\endverbatim + +The argument -lemon tells the compiler that we are using the +installed library LEMON. + +\subsection compile_user_local If LEMON is Installed User-Local + +You have to give more options to the compiler if LEMON is installed +user-local into a directory (denoted by ) +or if you just skipped the step make install. +In the later case denotes the directory in which the +the \c make command have been performed. + +\verbatim +g++ -lemon -I -L /lemon/.libs [other options] +\endverbatim + +\subsubsection compile_use_pkg_config Use pkg-config + +\todo Write this sub-subsection (\ref compile_use_pkg_config). */ diff -r 4b3d55acc9d7 -r a48bf0d3a790 mainpage.dox --- a/mainpage.dox Fri Oct 24 13:34:04 2008 +0100 +++ b/mainpage.dox Tue Oct 28 18:54:30 2008 +0100 @@ -23,9 +23,8 @@ \section toc Table of Contents - \ref intro - - \ref getting_started + - \ref basic_concepts "Basic Concepts" - \ref hello_lemon - - \ref basic_concepts "Basic Concepts" - \ref digraph_build "Build and Modify a Digraph" - \ref digraph_iterate "Iterate Over the Elements" - \ref standard_maps "Maps - Assign Data to Graphs" @@ -59,8 +58,12 @@ - \ref requirements_lemon - \ref requirements_lp - \ref install_from_source - - \ref install_system_rpm "From rpm" - - \ref install_user "Install Locally to the User" + - \ref install_hg + - \ref install_rpm + - \ref install_user + - \ref compile_codes + - \ref compile_system_wide + - \ref compile_user_local */ }