user2481909
user2481909

Reputation: 386

C++ Boost library geometry.hpp

I installed boost library in my ubuntu 12.04 LTS using command libboost-all-dev, but when I include /boost/geometry.hpp it doesn't get included. I have checked the system and it doesn't contain any geometry.hpp file or even any geometry. There is no geometry file in the boost library that i downloaded

Upvotes: 2

Views: 2261

Answers (3)

Adam Wulkiewicz
Adam Wulkiewicz

Reputation: 2098

As mentioned before you may download the most recent version of Boost from here: http://www.boost.org/users/download/

Then to install it follow this guide: http://www.boost.org/doc/libs/1_55_0/more/getting_started/unix-variants.html#id25

In short:

$ ./bootstrap.sh

then

$ ./b2 install

This will build all libraries (that are required to be built) and copy headers and libs into the /usr directory. So you should probably put sudo before ./b2. Then you'll be able to use them without passing additional parameters into the compiler.

It's also possible to build only some of the libaries. Check the guide.

Upvotes: 0

SirGuy
SirGuy

Reputation: 10770

Poking around a bit, downloading boost from the command line (apt-get or whatever) gets you boost version 1.46, but the geometry library only came out with boost 1.47.
You're better off getting boost from http://www.boost.org/users/download/ because ubuntu's repositories are always (in my expericence) several versions behind the most recent.

Upvotes: 2

user2711915
user2711915

Reputation: 2813

I downloaded boost 1.54 from http://www.boost.org/users/download/ 2 days ago. The version I got has

boost_1_54_0/boost/geometry.hpp

and

boost_1_54_0/boost/geometry/geometry.hpp

how did you get boost?

Upvotes: 2

Related Questions