This is just a utilitarian blog post on how to integrate the BOOST library in your project, in support of SCPI on a Linux Board - Part 3: TCP/IP Socket C++ programming.
Targeted to cross-compile people that build the project on Windows and execute the code on Linux.
Because this is an instructions post only, I don't make an effort to make it look nice.
That's easiest done on the Pi (or other linux machine).
you can later delete the package if you decide to use static library linking in your executable.
Get and build the boost libraries:
sudo apt-get install libboost-all-dev
On my ubuntu, the resulting libraries end here:
Use sftp to download them, in binary mode, to your development machine.
The location of these files is referenced in this post as the boost bin folder.
On that same development machine, download the latest boost release zip.
Expand and copy the boost folder to another location, (maybe where you hold your other lib sources/includes).
|advice: If using Eclipse or the ARM DS-5 community IDE, don't include or link the root of the extracted zip. The Eclipse indexer will go bezerk and you'll have a hard time recovering from that. Follow my advice and copy the boost folder to some other location.|
Add the directory where the boost subdirectory is copied into (the bin folder) to in your DS-5 IDE project to the include path.
In your linker settings, , add the following library search path and the following libraries:
The search path is the bin folder where you installed the boost compiled libs (the one you downloaded from the Pi)
The libraries are the one we're statically linking in (ptheread because boost needs it, the two others because our code uses those).
You can now build the example from SCPI on a Linux Board - Part 3: TCP/IP Socket C++ programming, and debug / execute it on the Linux board.
|SCPI on a Linux Board - Letter of Intent|
|SCPI on a Linux Board - Part 1: Proof of Concept|
|SCPI on a Linux Board - Part 2a: PiFace Digital C programming|
|SCPI on a Linux Board - Part 2b: PiFace Digital C++ programming|
|SCPI on a Linux Board - Part 3: TCP/IP Socket C++ programming|
|SCPI on a Linux Board - Part 3minor: C++ programming - using BOOST library|