C++ is great, but you tend to come across some things in other languages that C++ just doesn't have an equivalent function for, forcing you to have to write your own solution.  We're big fans of C++ and its to the metal simplicity and where possible we often try and avoid relying on third party libraries.  But after seeing Boost mentioned again and again when trying to do simple things like trim() a string, we decided enough banging of heads against a wall, time to upgrade C++ a bit for some projects!  Some argue its too bloated / too big a hammer for some small tasks, and that may be true for some use cases, but when you're just trying to get something simple done and don't want to have to waste time re-inventing the wheel again that big hammer can be very helpful and with a platform as powerful as the RPi it can often be the case that any hammer that gets the job done will do just fine thanks!

Downsides

The boost libraries are big and using their functions can cause compiling to become very slow when changing source code in any files that use boost due to the slow access the RPi has to is SD card hard disk.  

Installing boost on the Raspberry Pi

Go to http://www.boost.org and see what the current version is, then

Install all of boost (250MB+ of space needed):


	
sudo apt-get install libboost1.50-all

If it can't find it then try with previous version numbers until it finds one that's been made available for the RPi.

 

USEFUL?
We benefit hugely from resources on the web so we decided we should try and give back some of our knowledge and resources to the community by opening up many of our company’s internal notes and libraries through mini sites like this. We hope you find the site helpful.
Please feel free to comment if you can add help to this page or point out issues and solutions you have found, but please note that we do not provide support on this site. If you need help with a problem please use one of the many online forums.

Comments

  1. SeungSeob_Moon

    6 years ago

    $ sudo apt-cache search libboost

    libboost1.62-all-dev – Boost C++ Libraries development files (ALL)
    libboost1.62-dev – Boost C++ Libraries development files
    libboost1.62-doc – Boost.org libraries documentation
    libboost1.62-tools-dev – Boost C++ Libraries development tools

    $ sudo apt-get install libboost1.62-*

Leave a Reply to SeungSeob-Moon Cancel reply

Your email address will not be published. Required fields are marked *