Changes between Version 7 and Version 8 of user-compile


Ignore:
Timestamp:
Feb 13, 2011 10:38:43 AM (9 years ago)
Author:
stefan
Comment:

update install paths and docu on addlibs; do not advertise make dist; replace COIN by COIN-OR; correct link to MSVC project

Legend:

Unmodified
Added
Removed
Modified
  • user-compile

    v7 v8  
    11= Compiling and Installing the Package =
    22
    3 These instructions only pertain to UNIX-like systems, where the {{{configure}}} scripts can be run.  If you want to use the MS Developer Studio to compile the code, please see the [http://projects.coin-or.org/MSDevStudio MSDevStudio project page].
     3These instructions only pertain to UNIX-like systems, where the {{{configure}}} scripts can be run.  If you want to use the MS Developer Studio to compile the code, please see the [http://projects.coin-or.org/MSVisualStudio MSDevStudio project page].
    44
    55If you have problems, have a look at the [wiki:user-troubleshooting troubleshooting page.]
     
    1616The COIN Makefiles should work with any UNIX {{{make}}}.   If you are using GNU make and want to use the parallel compilation feature, you can do this by specifying the {{{-j N}}} option to {{{make}}}, where {{{N}}} is the number of parallel compilations you want to start.  A good value for {{{N}}} is the number of available processors plus 1.
    1717
    18 If the '''compilation fails''', the screen output hopefully helps you to find out what is going wrong.  The output is quite verbose, and you see all command lines that are executed.  Since most of the COIN Makefiles are generated with the GNU packages {{{automake}}} and {{{libtool}}} they are somewhat complicated and might look confusing.  Unless you know what you are doing, it not easy to change the Makefiles.  If you want to make modifications, you should modify the [wiki:pm-autotools Makefile.am files] and use the GNU autotools to generate the real Makefile.
     18If the '''compilation fails''', the screen output hopefully helps you to find out what is going wrong.  The output is quite verbose, and you see all command lines that are executed.  Since most of the COIN-OR Makefiles are generated with the GNU packages {{{automake}}} and {{{libtool}}} they are somewhat complicated and might look confusing.  Unless you know what you are doing, it not easy to change the Makefiles.  If you want to make modifications, you should modify the [wiki:pm-autotools Makefile.am files] and use the GNU autotools to generate the real Makefile.
    1919
    2020== Testing the Compilation ==
    2121
    22 Most of the COIN projects provide a unit test (in the {{{test}}} subdirectory), which can be used to verify if the compiled code works correctly.  If you want to test the compilation for the main project only (e.g., {{{Clp}}}) you type in {{{Coin-Clp/build}}}
     22Most of the COIN-OR projects provide a unit test (in the {{{test}}} subdirectory), which can be used to verify if the compiled code works correctly.  If you want to test the compilation for the main project only (e.g., {{{Clp}}}) you type in {{{Coin-Clp/build}}}
    2323
    2424{{{
     
    3232}}}
    3333
    34 This will run the available unit test for {{{Clp}}} and all other
    35 downloaded COIN projects.
     34This will run the available unit test for {{{Clp}}} and all other downloaded COIN-OR projects.
    3635
    3736You don't need to type {{{make}}} before running {{{make test}}} or {{{make tests}}}.
     
    4544}}}
    4645
    47 Again, you don't need to type {{{make}}} first.  This will install the executable files in {{{$prefix/bin}}}, the libraries in {{{$prefix/lib}}}, and the header files in {{{$prefix/include}}}.  Here, {{{$prefix}}} stands for the installation directory, which by default is the directory in which you ran the {{{configure}}} script (which on this page we assumed to be {{{Coin-Pkg/build}}}).  The installation directory is otherwise the argument you specified with the {{{--prefix}}} argument for {{{configure}}}.
     46Again, you don't need to type {{{make}}} first.  This will install the executable files in {{{$prefix/bin}}}, the libraries in {{{$prefix/lib}}}, the header files in {{{$prefix/include/coin}}}, documentation in {{{$prefix/share/coin/doc/Pkg}}}, and data files in {{{$prefix/share/coin/Data/Pkg}}}.  Here, {{{$prefix}}} stands for the installation directory, which by default is the directory in which you ran the {{{configure}}} script (which on this page we assumed to be {{{Coin-Pkg/build}}}).  The installation directory is otherwise the argument you specified with the {{{--prefix}}} argument for {{{configure}}}.
    4847
    49 In the {{{lib}}} directory you will also see '''*_addlibs.txt''' files (such as {{{clp_addlibs.txt}}}).  This contains a string with additionally required libraries (such as {{{-lz}}} if you are using the zlib GNU package), adapted to your system and configuration settings.  If you link with an installed COIN library, you should also specify the context of the corresponding {{{*_addlibs.txt}}} file in the link command.
     48In the {{{share/coin/doc/Pkg}}} directory you may also see a '''pkg_addlibs.txt''' file (such as {{{clp_addlibs.txt}}}).  This contains a string with linker flags necessary to link against the library of the Pkg project (such as {{{-lz}}} if you are using the zlib GNU package), adapted to your system and configuration settings.  If you want to link with an installed COIN-OR library, you should either use pkg-config or specify the context of the corresponding {{{pkg_addlibs.txt}}} file in the link command.
    5049
    51 Some COIN projects come with examples that show how a generated library can be used.  In that case, in the {{{examples}}} subdirectory for the project, you will find a simple Makefile to compile the examples, adapted to your settings.  '''If you want to link your own code with a COIN library, it is probably best to start with this example Makefile'''; read more [wiki:user-examples here].
     50Some COIN-OR projects come with examples that show how a generated library can be used.  In that case, in the {{{examples}}} subdirectory for the project, you will find a simple Makefile to compile the examples, adapted to your settings.  '''If you want to link your own code with a COIN-OR library, it is probably best to start with this example Makefile'''; read more [wiki:user-examples here].
    5251
    5352== Further Makefile Targets ==
     
    5958 * '''distclean''': This deletes everything that has been created since running the {{{configure}}} script, except for installed files.
    6059
    61  * '''uninstall''': This deletes all files that have been previously copied by a {{{make install}}}, but it doesn't touch oher any compiler generated files.
    62 
    63  * '''dist''': This creates a source code tarball for the COIN package.  Note that the COIN tarballs are not generated in this way, and that this target might not work in all projects.
     60 * '''uninstall''': This deletes all files that have been previously copied by a {{{make install}}}, but it doesn't touch any other compiler generated files.