Error: boost/scoped_ptr.hpp: No such file or directory while using libkml - c++

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.

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/

Related

How I install wxWidgets in msys2 correctly?

I'm having trouble installing wxWidgets in msys2, I used pacman to install the library
pacman -S mingw-w64-clang-x86_64-wxwidgets3.0-msw
But when I try to execute a test file it gives me this error
fatal error: wx/wx.h: No such file or directory
Reading online I see that are in another methods of installing the library you have to compile it, but I can't find any information in regards to installing it with pacman.
I also tried to compile it myself with Cmake following the instructions in the wxwidgets page but I failed and I want to see what should I do now.
What I need to do to get this to work?

Compile a C++ program (LANShare)

I'm having problems compiling LANShare's sourcecode.
I need to compile this program because i need to use it on a 32-bit unix machine and there's no .deb or appimage release file.
This is LANShare.
As you can see there's no config file and i don't know how i can proceed with compilation.
I compiled from source many times but here there's no Readme nor instructions, then I opened an issue but there's no response yet.
Found a solution, thanks to n. 1.8e9-where's-my-share m.
Theese instructions should be valid for any Debian 10 install.
To install qt tools:
sudo apt install qt5-qmake qt5-default
then to compile:
qmake -o Makefile LANShare.pro
make
within the README.md file there is:
You can download the Ubuntu package or linux AppImage or Windows executable from the release page.
https://github.com/abdularis/LAN-Share/releases
Using .deb (Ubuntu/Debian)
download the latest version, for example lanshare_1.2.1-1_amd64.deb then open a terminal, navigate to directory where the downloaded package is located and type
$ sudo dpkg -i ./lanshare_1.2.1-1_amd64.deb

Installing node js pulsar client on ubuntu

I am trying to install the pulsar-client for node js client on ubuntu. I get the following error:
fatal error: pulsar/c/message.h: No such file or directory #include <pulsar/c/message.h>
compilation terminated.
Pulsar.target.mk:116: recipe for target 'Release/obj.target/Pulsar/src/addon.o' failed
make: *** [Release/obj.target/Pulsar/src/addon.o] Error 1
the documentation says
Pulsar Node.js client library is based on the C++ client library.
Follow the instructions for C++ library for installing the binaries
through RPM, Deb or Homebrew packages.
(Note: you will need to install not only the pulsar-client library but
also the pulsar-client-dev library)
However, the instructions for installing C++ library on Ubuntu are not very clear. It is also not clear how to install pulsar-client-dev library.
You are right that C++ library must be installed. One note is please make sure the compatible C++ library is installed.
https://github.com/apache/pulsar-client-node#compatibility
To install C++ library ubuntu, here is an example which is from our Docker image build on Ubuntu based.
https://github.com/kafkaesque-io/pulsar-beam/blob/master/Dockerfile#L29
wget --user-agent=Mozilla -O apache-pulsar-client.deb "https://archive.apache.org/dist/pulsar/pulsar-2.4.1/DEB/apache-pulsar-client.deb"
wget --user-agent=Mozilla -O apache-pulsar-client-dev.deb "https://archive.apache.org/dist/pulsar/pulsar-2.4.1/DEB/apache-pulsar-client-dev.deb"
apt install -y ./apache-pulsar-client.deb
apt install -y ./apache-pulsar-client-dev.deb

Installing c++ boost using cygwin: can't find configure file

I'm trying to install Boost for c++. Since I use cygwin (on Windows 7) I follow these instructions for Unix.
I start by downloading boost_1_55_0.zip from sourceforge. The instructions tell me to run tar --bzip2 -xf /path/to/boost_1_55_0.zip but this doesn't work (probably because the downloaded file is .zip and not .tar.bz2; I can't find the latter anywhere to download), so instead I use winrar and unzip it into /usr/local.
After this the header-only libraries work fine, but I need the ones where a build is necessary.
The instructions tells me to go to the boost folder and run./configure --help, but this doesn't work; I get the message -bash: ./configure: No such file or directory. So I locate the file configure in the folder /usr/local/boost_1_55_0/tools/build/v2/engine/boehm_gc, go there and try again, and this time it works: I get the help for configure.
I then try to run ./configure --prefix=/usr/local/boost_1_55_0 --enable-cplusplus but get the error message configure: error: cannot run /bin/sh ./config.sub. I try it with only one or none of the options too but that doesn't help.
Any ideas?
I don't know what guide you're following, but to install boost I have done:
cd boost
./bootstrap.sh
./b2
./b2 install
stop
As report boost doc:
If you plan to build from the Cygwin bash shell, you're actually
running on a POSIX platform and should follow the instructions for
getting started on Unix variants. Other command shells, such as
MinGW's MSYS, are not supported—they may or may not work.

Boost "no such file or directory"

I'm trying to set up my Code::Blocks work environment on a new computer and I'm having some problems. It's been a long time since I first did this, and now when I open my major project Boost is causing me problems.
I'm fairly new to C++ still and fixing this type of problem is something I have limited experience with.
When I open my project and try to compile it, I get this error:
fatal error: boost/algorithm/string.hpp: No such file or directory|
At this part of one of my header files:
#include <boost/algorithm/string.hpp>
I placed the Boost v1.51.0 library at C:\boost since that is where I'd had it on my other computer. My project is set to search that directory for additional includes but it doesn't seem to be finding the files?
My project used an older version of Boost previously but I doubt that's an issue.
I'm not sure how difficult it is to debug this problem with this limited information so if there's anything else I can provide please let me know.
I'm using Code::Blocks, and have just set up minGW and Visual C++ 2010.
In Ubuntu use
sudo apt-get install libboost-dev
Ensure that you have installed boost-devel package
In Centos execute as root:
yum install boost-devel
then
root#centos6 /]# find / -name boost
/usr/include/boost
/usr/lib64/boost
[root#centos6 /]#