如何编译提振async_client.cpp [英] How to compile boost async_client.cpp

查看:144
本文介绍了如何编译提振async_client.cpp的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是正确的命令编译这个code?
http://www.boost.org/doc/libs/1_45_0/doc/html/boost_asio/example/http/client/async_client.cpp
我已经安装Boost库在/ usr / include中/升压

What is the correct command to compile this code? http://www.boost.org/doc/libs/1_45_0/doc/html/boost_asio/example/http/client/async_client.cpp I had installed boost library in /usr/include/boost

推荐答案

例如

clang++ -std=c++03 -Wall -pedantic -g -O2 async_client.cpp -o async_client -lboost_system -lboost_thread -lpthread

假设你的系统的封装升压的版本(或pre-配置包括:&放; LIB路径)。要使用你的定制Boost库树的〜/自定义/升压

clang++ -std=c++03 -Wall -pedantic -g -O2 \
     -isystem ~/custom/boost/ ~/custom/boost/libs/asio/example/cpp03/http/client/ \
     async_client.cpp -o async_client \
     -L ~/custom/boost/stage/lib/ -Wl,-rpath,/home/sehe/custom/boost/stage/lib \
     -lboost_system -lboost_thread -lpthread

替换铛++ G ++ 随意

-std = C ++ 03 -pedantic -Wall -g -O2 仅供expositional目的。

-std=c++03 -Wall -pedantic -g -O2 only for expositional purposes.

这篇关于如何编译提振async_client.cpp的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆