4

I am developing a software which uses Google Map database. I searched google and I found a library in C++ can do that - libkml. I've downloaded some examples code in this website, but when I compiled with this command: g++ main.cpp -lkml, it occured an error:

fatal error: boost/scoped_ptr.hpp: No such file or directory

What is "boost/scoped_ptr.hpp"? I try finding this file in terminal

locate boost/scoped_ptr.hpp 

but there's nothing.

Uyghur Lives Matter
  • 18,820
  • 42
  • 108
  • 144
GV vo
  • 53
  • 1
  • 1
  • 4

1 Answers1

9

You need to install the boost libraries from http://www.boost.org/

Depending on your OS there will be pre-built solutions that you can install. For example on Ubuntu you can do sudo apt-get install libboost-all-dev. On Mac see this thread Boost: MacOSX binaries for Boost On Windows this may help: http://boost.teeks99.com/

Community
  • 1
  • 1
hogliux
  • 231
  • 1
  • 4
  • 18
  • well, you 're right. I've installed libboost, but when I compiled again, it had another error: cannot find -lkml althougth I installed the libkml with command: sudo apt-get install libkml-dev. I don't understand. I try to find this library but there was no where to be found. Can you help me? – GV vo Oct 21 '13 at 10:26
  • `libkml` is made up of several libraries. Although I haven't used libkml myself, this [link](http://code.google.com/p/libkml/issues/detail?id=146&q=link) suggests you need to link with `-lkmlbase -lkmlconvenience -lkmlengine -lkmldom` – hogliux Oct 21 '13 at 13:47
  • okay, I will check, thank you :). By the way, I have a question: Can I use directly Google map in my PC? I mean is it necessary to make a web, and the map is accessed by the browser or I can use [link](http://maps.google.com), export to kml file and process it? – GV vo Oct 21 '13 at 14:57
  • how can one install `boost` on `Red Hat` OS ? – Farid Alijani Mar 26 '20 at 08:04
  • @FäridAlijani please submit a new question with your specific problem. – koen Apr 10 '20 at 15:22