LoginSignup
1
0

More than 5 years have passed since last update.

CentOS+Boost+Asio

Posted at

ひとまず必要なSWをインストール

sudo yum groupinstall "Base" 1
sudo yum groupinstall "Development Tools" 1
sudo yum groupinstall "Japanese Support" 1

Boostのインストール

sudo yum install boost*

インストールパスを確認

find / -name boost
以下にインストールされます。
ライブラリ:/usr/lib64/boost
インクルード:/usr/include/boost

コーディング

まずはサンプルをビルドしてみましょう

ビルド

ビルド時のコマンド。(太字個所は要注意)

g++ -g -MMD -MP -Wall -Wextra -Winit-self -Wno-unused-parameter -Wfloat-equal -I../inc -I/usr/include/boost -o obj/main.o -c main.cpp
g++ -o ../bin/TimerSync obj/main.o -L/usr/lib64/boost -lboost_system -lpthread

実行

./TimerSync

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0