|
| 1 | +.. _getting_started: |
| 2 | + |
| 3 | +***************** |
| 4 | + Getting Started |
| 5 | +***************** |
| 6 | + |
| 7 | +Downloading an official release |
| 8 | +=============================== |
| 9 | + |
| 10 | +All stable versions of :mod:`cpp-netlib` can be downloaded from |
| 11 | +Github_. Each release is available as gzipped (Using the command |
| 12 | +``tar xzf cpp-netlib.tar.gz``) or bzipped (Using ``tar xjf |
| 13 | +cpp-netlib.tar.bz2``) tarball, or as a zipfile (``unzip |
| 14 | +cpp-netlib.zip``, or on Windows using a tool such as 7zip_). |
| 15 | + |
| 16 | +.. _Github: http://github.com/cpp-netlib/cpp-netlib/downloads |
| 17 | +.. _7zip: http://www.7-zip.org/ |
| 18 | + |
| 19 | +Downloading a development version |
| 20 | +================================= |
| 21 | + |
| 22 | +The :mod:`cpp-netlib` uses Git_ for source control, so to use any |
| 23 | +development versions Git must be installed on your system. |
| 24 | + |
| 25 | +Using the command line, the command to get the latest code is: |
| 26 | + |
| 27 | +:: |
| 28 | + |
| 29 | + shell$ git clone git://github.com/mikhailberis/cpp-netlib.git |
| 30 | + |
| 31 | +This should be enough information get to started. To do more complex |
| 32 | +things with Git, such as pulling changes or checking out a new branch, |
| 33 | +refer to the `Git documentation`_. |
| 34 | + |
| 35 | +Windows users need to use msysGit_, and to invoke the command above |
| 36 | +from a shell. |
| 37 | + |
| 38 | +For fans of Subversion_, the same code can be checked out from |
| 39 | +http://svn.github.com/mikhailberis/cpp-netlib.git. |
| 40 | + |
| 41 | +.. _Git: http://git-scm.com/ |
| 42 | +.. _`Git documentation`: http://git-scm.com/documentation |
| 43 | +.. _msysGit: http://code.google.com/p/msysgit/downloads/list |
| 44 | +.. _Subversion: http://subversion.tigris.org/ |
| 45 | + |
| 46 | +.. note:: The :mod:`cpp-netlib` project is hosted on GitHub_ and follows the |
| 47 | + prescribed development model for GitHub_ based projects. This means in case |
| 48 | + you want to submit patches, you will have to create a fork of the project |
| 49 | + (read up on forking_) and then submit a pull request (read up on submitting |
| 50 | + `pull requests`_). |
| 51 | + |
| 52 | +.. _forking: http://help.github.com/forking/ |
| 53 | +.. _`pull requests`: http://help.github.com/pull-requests/ |
| 54 | + |
| 55 | +Getting Boost |
| 56 | +============= |
| 57 | + |
| 58 | +:mod:`cpp-netlib` depends on Boost_. It should work for any version |
| 59 | +of Boost above 1.41.0. If Boost is not installed on your system, the |
| 60 | +latest package can be found on the `Boost web-site`_. The environment |
| 61 | +variable ``BOOST_ROOT`` must be defined, which must be the full path |
| 62 | +name of the top directory of the Boost distribution. Although Boost |
| 63 | +is mostly header only, applications built using :mod:`cpp-netlib` |
| 64 | +still requires linking with `Boost.System`_, `Boost.Date_time`_, and |
| 65 | +`Boost.Regex`_. |
| 66 | + |
| 67 | +.. _Boost: http://www.boost.org/doc/libs/release/more/getting_started/index.html |
| 68 | +.. _`Boost web-site`: http://www.boost.org/users/download/ |
| 69 | +.. _`Boost.System`: http://www.boost.org/libs/system/index.html |
| 70 | +.. _`Boost.Date_time`: http://www.boost.org/libs/date_time/index.html |
| 71 | +.. _`Boost.Regex`: http://www.boost.org/libs/regex/index.html |
| 72 | + |
| 73 | +.. note:: You can follow the steps in the `Boost Getting Started`_ guide to |
| 74 | + install Boost into your development system. |
| 75 | + |
| 76 | +.. _`Boost Getting Started`: |
| 77 | + http://www.boost.org/doc/libs/release/more/getting_started/index.html |
| 78 | + |
| 79 | +Getting CMake |
| 80 | +============= |
| 81 | + |
| 82 | +The :mod:`cpp-netlib` uses CMake_ to generate platform-specific build files. If |
| 83 | +you intend to run the test suite, you can follow the instructions below. |
| 84 | +Otherwise, you don't need CMake to use :mod:`cpp-netlib` in your project. The |
| 85 | +:mod:`cpp-netlib` requires CMake version 2.8 or higher. |
| 86 | + |
| 87 | +.. _CMake: http://www.cmake.org/ |
| 88 | + |
| 89 | +Let's assume that you have unpacked the :mod:`cpp-netlib` at the top of your |
| 90 | +HOME directory. On Unix-like systems you will typically be able to change into |
| 91 | +your HOME directory using the command ``cd ~``. This sample below assumes that |
| 92 | +the ``~/cpp-netlib`` directory exists, and is the top-level directory of the |
| 93 | +:mod:`cpp-netlib` release. |
| 94 | + |
| 95 | +Building with CMake |
| 96 | +=================== |
| 97 | + |
| 98 | +To build the tests that come with cpp-netlib, we first need to configure the |
| 99 | +build system to use our compiler of choice. This is done by running the |
| 100 | +``cmake`` command at the top-level directory of :mod:`cpp-netlib` with |
| 101 | +additional parameters:: |
| 102 | + |
| 103 | + $ cd ~/cpp-netlib |
| 104 | + $ cmake -DCMAKE_BUILD_TYPE=Debug \ |
| 105 | + > -DCMAKE_C_COMPILER=gcc \ |
| 106 | + > -DCMAKE_CXX_COMPILER=g++ \ |
| 107 | + > . |
| 108 | + |
| 109 | +On Linux, this will generate the appropriate Makefiles that will enable you to |
| 110 | +build and run the tests and examples that come with :mod:`cpp-netlib`. To build |
| 111 | +the tests, you can run ``make`` in the same top-level directory of |
| 112 | +:mod:`cpp-netlib`:: |
| 113 | + |
| 114 | + $ make |
| 115 | + |
| 116 | +.. note:: Just like with traditional GNU Make, you can add the ``-j`` parameter |
| 117 | + to specify how many parallel builds to run. In case you're in a sufficiently |
| 118 | + powerful system and would like to parallelize the build into 4 jobs, you can |
| 119 | + do this with:: |
| 120 | + |
| 121 | + make -j4 |
| 122 | + |
| 123 | + As a caveat, :mod:`cpp-netlib` is heavy on template metaprogramming and will |
| 124 | + require a lot of computing and memory resources to build the individual |
| 125 | + tests. Do this at the risk of thrashing_ your system. |
| 126 | + |
| 127 | +.. _thrashing: http://en.wikipedia.org/wiki/Thrashing_(computer_science) |
| 128 | + |
| 129 | +Once the build has completed, you can now run the test suite by issuing:: |
| 130 | + |
| 131 | + $ make test |
| 132 | + |
| 133 | +Building On Windows |
| 134 | +~~~~~~~~~~~~~~~~~~~ |
| 135 | + |
| 136 | +If you're using the Microsoft Visual C++ compiler or the Microsoft Visual Studio |
| 137 | +IDE and you would like to build cpp-netlib from within Visual Studio, you can |
| 138 | +look for the solution and project files as the artifacts of the call to |
| 139 | +``cmake`` -- the file should be named ``cpp-netlib.sln`` (the solution) along |
| 140 | +with a number of project files for Visual Studio. |
| 141 | + |
| 142 | +Reporting Issues, Getting Support |
| 143 | +================================= |
| 144 | + |
| 145 | +In case you find yourself stuck or if you've found a bug (or you want to just |
| 146 | +join the discussion) you have a few options to choose from. |
| 147 | + |
| 148 | +For reporting bugs, feature requests, and asking questions about the |
| 149 | +implementation and/or the documentation, you can go to the GitHub issues page |
| 150 | +for the project at http://github.com/mikhailberis/cpp-netlib/issues. |
| 151 | + |
| 152 | +You can also opt to join the developers mailing list for a more personal |
| 153 | +interaction with the developers of the project. You can join the mailing list |
| 154 | +through https://lists.sourceforge.net/lists/listinfo/cpp-netlib-devel. |
| 155 | + |
| 156 | +You may also choose to get commercial support from the maintainers of the |
| 157 | +project, in which case you can reach them through: |
| 158 | + |
| 159 | + Dean Michael Berris - <me@deanberris.com> |
| 160 | + |
| 161 | + Glyn Matthews |
| 162 | + |
| 163 | + Mike Dickey |
| 164 | + |
| 165 | + |