element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Test & Tools
  • Technologies
  • More
Test & Tools
Blog SCPI on a Linux Board - Part 3minor: C++ programming - using BOOST library
  • Blog
  • Forum
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Test & Tools to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Jan Cumps
  • Date Created: 24 Jun 2018 3:18 PM Date Created
  • Views 1060 views
  • Likes 2 likes
  • Comments 0 comments
  • boost
  • c++
  • linux
Related
Recommended

SCPI on a Linux Board - Part 3minor: C++ programming - using BOOST library

Jan Cumps
Jan Cumps
24 Jun 2018

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.

 

 

Build the BOOST libraries

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:

/usr/lib/arm-linux-gnueabihf/libboost*

 

 

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).

 

 

image 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.

 

image

 

In your linker settings, , add the following library search path and the following libraries:

image

 

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.

 

Good luck

related blog
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
  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube