summaryrefslogtreecommitdiff
path: root/libs/geometry/doc/compiling.qbk
blob: 01c99fb74561d62cca8a9ffcf398b6a2d43bd58a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
[/==============================================================================
    Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
    Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
    Copyright (c) 2009-2012 Mateusz Loskot, London, UK., London, UK

    Use, modification and distribution is subject to the Boost Software License,
    Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
    http://www.boost.org/LICENSE_1_0.txt)
===============================================================================/]



[section Compilation]

[def __msvc__ MSVC]
[def __stlport__ [@http://sourceforge.net/projects/stlport STLport]]

__boost_geometry__ is a headers-only library. Users only need to include the 
library headers in their programs in order to be able to access definitions 
and algorithms provided by the __boost_geometry__ library. No linking against 
any binaries is required. 

__boost_geometry__ is only dependant on headers-only __boost__ libraries.
It does not introduce indirect dependencies on any binary libraries.

In order to be able to use __boost_geometry__, the only thing users need to do 
is to download and/or install Boost  and specify location to include 
directories, so `include` directives of this scheme will work:

    #include <boost/...>

[heading Supported Compilers]

__boost_geometry__ library has been successfully tested with the following 
compilers:

* __msvc__ (including Express Editions)
  * 10.0 (__msvc__ 2010) [/reported by Trunk report May 8, 2011]
  *  9.0 (__msvc__ 2008) [/reported by Trunk report May 8, 2011]
  *  8.0 (__msvc__ 2005) [/reported by Trunk report May 8, 2011]
* gcc
  * gcc 4.7.0 [/reported by Trunk report February 12, 2012]
  * gcc 4.6.2 [/reported by Trunk report February 12, 2012]
  * gcc 4.6.1 [/reported by Trunk report May 8, 2011]
  * gcc 4.6.0 [/reported by Trunk report May 8, 2011]
  * gcc 4.5.2 [/reported by Trunk report May 8, 2011]
  * gcc 4.4.0 [/reported by Trunk report May 8, 2011]
  * gcc 4.3.4 [/reported by Trunk report March 26, 2011]
  * gcc 4.2.1 [/reported by Trunk report May 8, 2011]
  * gcc 3.4.6 [/reported by Trunk report March 26, 2011]
* clang
  * clang 3.3 [/reported by mloskot on October, 2013]
  * clang 3.2 [/reported by Trunk report March 26, 2011]
* darwin
  * darwin 4.0.1 [/reported by Trunk report March 26, 2011]
  * darwin 4.4 [/reported by Trunk report March 26, 2011]
* intel
  * intel 11.1 [/reported by Trunk report March 26, 2011]
  * intel 11.0 [/reported by Trunk report March 26, 2011]
  * intel 10.1 [/reported by Trunk report March 26, 2011]
* pathscale
  * pathscale 4.0.8 [/reported by Trunk report March 26, 2011]
  
__boost_geometry__ uses __boost_bb__, a text-based system for developing and 
testing software, to configure, build and execute unit tests and example 
programs. The build configuration is provided as a collection of `Jamfile.v2` 
files.

For gcc, flag [^-Wno-long-long] can be used to surpress some warnings 
originating from Boost.

[heading Includes]

The most convenient headerfile including all algorithms and strategies is 
`geometry.hpp`:

    #include <boost/geometry.hpp>

This is the main header of the __boost_geometry__ library and it is 
recommended to include this file.

Alternatively, it is possible to include __boost_geometry__ header files 
separately. However, this may be inconvenient as header files might be renamed 
or moved occasionaly in future.

Another often used header is `geometries.hpp`:

    #include <boost/geometry/geometries/geometries.hpp>

This includes definitions of all provided geometry types:

* point, 
* linestring,
* polygon,
* ring,
* multi_point,
* multi_linestring,
* multi_polygon,
* box,
* segment.

The file `geometries.hpp` is not included in 
the `geometry.hpp` headerfile because users should be given the liberty to use 
their own geometries and not the provided ones. However, for the 
__boost_geometry__ users who want to use the provided geometries it is useful 
to include.

[heading Advanced Includes]

Users who have their own geometries and want to use algorithms from 
__boost_geometry__ might include the files containing registration 
macro's, like:

    #include <boost/geometry/geometries/register/point.hpp>

[heading Performance]

The enumeration below is not exhaustive but can contain hints to improve the 
performance:

* For Microsoft __msvc__, set define `_SECURE_SCL=0` for preprocessor.
* For Microsoft __msvc__, set define `_HAS_ITERATOR_DEBUGGING=0` for preprocessor.
* Use of __stlport__, a popular open-source implementation of the STL, may result in
  significantly faster code than use of the C++ standard library provided by __msvc__.
* Turn on compiler optimizations, compile in release mode.

[heading Problems with Intellisense]

Both versions of __msvc__, 2005 and 2008 (including Express Editions) can hang 
trying to resolve symbols and give [@http://en.wikipedia.org/wiki/IntelliSense 
IntelliSense] suggestions while typing in a bracket or angle bracket.
This is not directly related to __boost_geometry__, but is caused by problems 
with handling by this IDE large C++ code base with intensively used templates, 
such as Boost and __boost_geometry__. If this is inconvenient, IntelliSense 
can be turned off:

[:['["(...)disabling IntelliSense in VC++. There is a file called `feacp.dll` in
`<VS8INSTALL>/VC/vcpackages` folder. Renaming this file will disable Intellisense feature.]]

-- [@http://blogs.msdn.com/yash/archive/2007/09/19/intellisense-issues-in-visual-c-2005.aspx Intellisense issues in Visual C++ 2005] 
]


[endsect] [/ end of Compilation]