C++ tips: using external libraries in gcc project

sudo apt-get install libboost-all-dev
#include <iostream>
#include <boost/thread.hpp>
#include <boost/bind.hpp>
int main()
g++ -o test_boost test_boost.cpp -lboost_system
int main()
unsigned int arr[5] = { 0x05, 0x04, 0xAA, 0x0F, 0x0D };

std::cout << boost::format("%02X-%02X-%02X-%02X-%02X")
% arr[0]
% arr[1]
% arr[2]
% arr[3]
% arr[4]
<< std::endl;




Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

How Fairwinds Insights Compliance Self-Assessment Now Simplifies SOC 2

Create your own UICollectionView API

Building a Prototype for a Spotify Peer-to-Peer Automated Playlist Creator Using Python &…

#Birdchainian, A new beginning

Build a serverless BigQuery ingestion pipeline using Cloud Workflows

Stabiliser and launcher

Step-by-Step Guide to Create a GitHub App

Network partitioning in Zookeeper

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Privalov Vladimir

Privalov Vladimir

More from Medium

Integrating Lua with C: Part 5

C — Static libraries

My journey from the world of Java and Python to C++

Super simple example of adding Lua to C++