{"id":2409,"date":"2016-01-14T17:12:16","date_gmt":"2016-01-14T17:12:16","guid":{"rendered":"https:\/\/raspberry-projects.com\/pi\/?p=2409"},"modified":"2016-01-15T13:00:59","modified_gmt":"2016-01-15T13:00:59","slug":"installing-and-using-boost","status":"publish","type":"post","link":"https:\/\/raspberry-projects.com\/pi\/programming-in-c\/boost-c-libraries\/installing-and-using-boost","title":{"rendered":".Installing and Using Boost"},"content":{"rendered":"<p>\nC++ is great, but you tend to come across some things in other languages&nbsp;that C++ just doesn&#39;t have an equivalent function&nbsp;for, forcing you to have to write your own solution. &nbsp;We&#39;re big fans of C++ and&nbsp;its to the metal simplicity and where possible we often try and avoid relying on third party libraries. &nbsp;But after seeing Boost mentioned again and again when trying to do simple&nbsp;things like trim() a string, we decided enough banging of heads against a wall, time to upgrade C++ a bit for some projects! &nbsp;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&#39;re just trying to get something simple done and don&#39;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&nbsp;can often be the&nbsp;case that any hammer that gets the job done&nbsp;will do just fine thanks!\n<\/p>\n<h4>\nDownsides<br \/>\n<\/h4>\n<p>\nThe 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. &nbsp;\n<\/p>\n<h4>\nInstalling boost on the Raspberry Pi<br \/>\n<\/h4>\n<p>\nGo to <a href=\"http:\/\/www.boost.org\">http:\/\/www.boost.org<\/a>&nbsp;and see what the current version is, then\n<\/p>\n<p>\nInstall all of boost (250MB+ of space needed):\n<\/p>\n<pre>\r\n<code>\r\n\t\r\nsudo apt-get install libboost1.50-all\r\n<\/code><\/pre>\n<p>\nIf it can&#39;t find it then try with previous version numbers&nbsp;until it finds one that&#39;s&nbsp;been made available for the RPi.\n<\/p>\n<p>\n&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>C++ is great, but you tend to come across some things in other languages&nbsp;that C++ just doesn&#39;t have an equivalent function&nbsp;for, forcing you to have to write your own solution. &nbsp;We&#39;re big fans of C++ and&nbsp;its to the metal simplicity and where possible we often try and avoid relying on third party libraries. &nbsp;But after [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[118],"tags":[],"class_list":["post-2409","post","type-post","status-publish","format-standard","hentry","category-boost-c-libraries"],"_links":{"self":[{"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/posts\/2409","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/comments?post=2409"}],"version-history":[{"count":8,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/posts\/2409\/revisions"}],"predecessor-version":[{"id":2432,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/posts\/2409\/revisions\/2432"}],"wp:attachment":[{"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/media?parent=2409"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/categories?post=2409"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/tags?post=2409"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}