Imported Upstream version 1.63.0
[platform/upstream/boost.git] / libs / geometry / doc / doxy / doxygen_output / xml / compiling.xml
1 <?xml version='1.0' encoding='UTF-8' standalone='no'?>
2 <doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.8.6">
3   <compounddef id="compiling" kind="page">
4     <compoundname>compiling</compoundname>
5     <title>Compiling</title>
6     <detaileddescription>
7 <sect1 id="compiling_1compiling_intro">
8 <title>Compiling Boost.Geometry</title>
9 <para>Boost.Geometry is a Header Only library. So just including the headerfiles is enough to use the algorithms. Nothing has to be linked.</para><para>Boost.Geometry is only dependant on (header only) Boost libraries. Download the Boost Library Collection from www.boost.org, adapt the include path to include Boost.</para></sect1>
10 <sect1 id="compiling_1platforms">
11 <title>Platforms</title>
12 <para>The library currently compiles successfully on the following platforms:<itemizedlist>
13 <listitem><para>MS Visual Studio 2008 (Express Edition)</para></listitem><listitem><para>MS Visual Studio 2005 (Express Edition)</para></listitem><listitem><para>gcc version 3.4</para></listitem><listitem><para>gcc version 4 (tested are 4.1, 4.2, 4.4)</para></listitem></itemizedlist>
14 </para><para>For Visual Studio, the examples contains some project files (for 2005). However, because the library is header only, it will be no problem to integrate it in your own project files.</para><para>The test and example folders contain also Jam-files for bjam / boost-build</para><para>For gcc, the flag -Wno-long-long can be used (surpressing warnings originating from Boost)</para></sect1>
15 <sect1 id="compiling_1convenient_includes">
16 <title>Convenient includes</title>
17 <para>This section concentrates on how to include GGL.</para><para>The most convenient headerfile including all algorithms and strategies is geometry.hpp:<itemizedlist>
18 <listitem><para>#include &lt;boost/geometry/geometry.hpp&gt; It is recommended to include this file. Alternatively, it is possible to include GGL headerfiles separately. However, this is inconvenient as files might be renamed or moved occasionaly.</para></listitem></itemizedlist>
19 </para><para>An often used headerfile is <ref refid="geometries_8hpp" kindref="compound">geometries.hpp</ref>:<itemizedlist>
20 <listitem><para>#include &lt;<ref refid="geometries_8hpp" kindref="compound">boost/geometry/geometries/geometries.hpp</ref>&gt; This includes all default geometries: point, linestring, polygon, linear_ring, box. It is not included in the &quot;geometry.hpp&quot; headerfile because users are allowed to use their own geometries. However, for library users who want to use the provided geometries it is most useful.</para></listitem></itemizedlist>
21 </para><para>For users using only Cartesian points, with floating point coordinates (double), in 2D or 3D, you can use instead:<itemizedlist>
22 <listitem><para>#include &lt;boost/geometry/geometries/cartesian2d.hpp&gt; This includes all 2D Cartesian geometries: point_2d, linestring_2d, etc. Using this headerfile the library seems to be a non-template library, so it is convenient for users that are not so into the template world.</para></listitem></itemizedlist>
23 </para></sect1>
24 <sect1 id="compiling_1advanced_includes">
25 <title>Advanced includes</title>
26 <para>This section is for users who have their own geometries and want to use algorithms from the Boost.Geometry.</para><para>If you want to use your own points it makes sense to use the registration macro&apos;s:<itemizedlist>
27 <listitem><para>#include &lt;<ref refid="geometries_2register_2point_8hpp" kindref="compound">boost/geometry/geometries/register/point.hpp</ref>&gt; macro&apos;s for point registration</para></listitem><listitem><para>#include &lt;<ref refid="geometries_2register_2box_8hpp" kindref="compound">boost/geometry/geometries/register/box.hpp</ref>&gt; macro&apos;s for box registration</para></listitem></itemizedlist>
28 </para></sect1>
29 <sect1 id="compiling_1extension_includes">
30 <title>Extensions</title>
31 <para>The GGL is currently (since 0.5) split into the kernel and several extensions. As this split is relatively new, there are not yet umbrella-include files, but most things below will do:</para><para>If you want to use the <bold>geographic</bold> coordinate system:<itemizedlist>
32 <listitem><para>the tag is already included in the kernel</para></listitem><listitem><para>#include &lt;boost/geometry/extensions/gis/geographic/strategies/andoyer.hpp&gt; for Andoyer distance calculations</para></listitem><listitem><para>#include &lt;boost/geometry/extensions/gis/geographic/strategies/vincenty.hpp&gt; for Vincenty distance calculations</para></listitem></itemizedlist>
33 </para><para>If you want to use the <bold>projections:</bold> <itemizedlist>
34 <listitem><para>#include &lt;boost/geometry/extensions/gis/projections/parameters.hpp&gt;</para></listitem><listitem><para>#include &lt;boost/geometry/extensions/gis/projections/projection.hpp&gt;</para></listitem><listitem><para>#include &lt;boost/geometry/extensions/gis/projections/factory.hpp&gt;</para></listitem></itemizedlist>
35 </para><para>If you want to use the <bold>circle</bold> (n-sphere)<itemizedlist>
36 <listitem><para>#include &lt;boost/geometry/extensions/nsphere/...&gt; <emphasis>Several headerfiles, there is not yet a common include</emphasis></para></listitem></itemizedlist>
37 </para></sect1>
38 <sect1 id="compiling_1performance">
39 <title>Performance</title>
40 <para>The enumeration below is not exhaustive but can contain hints to improve the performance<itemizedlist>
41 <listitem><para>For Microsoft, set the define _SECURE_SCL=0</para></listitem><listitem><para>For Microsoft, set the define _HAS_ITERATOR_DEBUGGING=0</para></listitem><listitem><para>our measurements indicate that MSVC 2005 generates faster code than MSVC 2008</para></listitem><listitem><para>Using StlPort results in significant faster code than Microsoft&apos;s standard library</para></listitem><listitem><para>Of course turn on compiler optimizations, compile in release mode</para></listitem></itemizedlist>
42 </para></sect1>
43 <sect1 id="compiling_1intellisense">
44 <title>Intellisense issues</title>
45 <para>Microsoft Visual Studio (Express) 2005 and 2008 can hang typing in a bracket or angle bracket. This is not directly related to GGL, but caused by heavy templated libraries such as Boost and GGL. If this is inconvenient, intellisense can easily be turned off:</para><para><emphasis>(...) disabling Intellisense in VC++. There is a file called feacp.dll in &lt;VS8INSTALL&gt;/VC/vcpackages folder. Renaming this file will disable Intellisense feature.</emphasis></para><para>Source: <ulink url="http://blogs.msdn.com/yash/archive/2007/09/19/intellisense-issues-in-visual-c-2005.aspx">http://blogs.msdn.com/yash/archive/2007/09/19/intellisense-issues-in-visual-c-2005.aspx</ulink> </para></sect1>
46     </detaileddescription>
47   </compounddef>
48 </doxygen>