You can find at Boost Org the fantastic library of free and handy code. I remember writing my first tree structures and data structure code back in the 1980s (during the pre-Internet times) in Pascal and wondering why we had to write this code–it should be available. I remember having to recopy in all of my code into the compiler I wrote to do a tree search. Boost covers much of this and many things that were just ideas–dreams–in the 1980s (like XML parsing).
I first learned of Boost when I was trying to compile some blockchain code. The Boost version of the Raspberry Pi OS, Raspbian was one version too old. Annoyingly, the code for the blockchain solution contained legacy code that would not compile at a higher level. I learned how to build Boost on a slow Raspberry Pi 3. I still could not get the code to run. I moved on but liked the Boost library.
The Boost library is meant to extend C++. I have written C++ for years for so many sketches for the Arduino. I have written some pretty impressive code for robots and other projects in Arduino’s version of C and C++. I was feeling confident I could code C++.
I saw that advertisements on Amazon for Cloud9, a development platform. It was cloud-based and free. This being Amazon Cloud it would likely cost something, usually about the cost of coffee in Starbucks (this is the PNW). I tried it out and create my first server. The IDE was a weak Eclipse version, but it could do all the languages I might need and some I did not need. Go was missing–Google’s language, but as Google is a competitor to Amazon it was not a surprise. It has C++ and version 9 and Python 3.6+, so I was happy.
The editor worked with some coloring for reserved words and some standard completion logic. It has the requirement that you save your work to a file for it to work well. I also noticed that the first compile failed and then worked after that. Again, the file needs to be there for the compile options to work I think.
I had trouble with remembering my C++ and made a few basic mistakes. The Arduino code I worked with over the last four years is not as formal as the includes of GNU C++, but once I finally took a quick online class from YouTube, I got my C++ to run. I do not remember “Hello, World” as this hard!
I used the Linux terminal to update my software and load Boost library 61, newest version. I followed the directions and built a library. It was in my workspace and not in the compile path. I created a link to the director in the correct place, and then it worked.
With Boost now working and an IDE and me remembering my C++, we are ready to start our project. Next post we’ll look at that.