作为Boost.Asio的头,只 [英] Boost.Asio as header-only

查看:259
本文介绍了作为Boost.Asio的头,只的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的项目中使用ASIO库的提振。其文档说也可以是仅标头如果不使用正则表达式和不使用SSL。但是,运行 BCP ASIO 拉了非常多libraies其中有些是与源等都需要编译,的bjam 等。

I want to use ASIO library from Boost in my project. Its doc say it can be header-only if regex is not used and SSL not used. However, running bcp for asio pulls a very many libraies some of which are with sources so need compiling, bjam etc.

我可以以某种方式使用ASIO项目,因为只有标题,没有库/源?我只需要ASIO,升压的不是其他的部分。

Can I somehow use ASIO in project as only headers, without libs/source? I only need ASIO, not other part of Boost.

编辑:ASIO想 Boost.System 其中有一个lib链接 - 这可以依赖不那么我可以用头只ASIO

ASIO want Boost.System which has a lib to link - can this dependency not be so that I can use header only ASIO?

推荐答案

据我所知,你可以从<一的ASIO非增压版href=\"http://think-async.com/Asio/AsioAndBoostAsio\">http://think-async.com/Asio/AsioAndBoostAsio

- Boost.Asio的使用Boost.System库错误codeS提供支持(的boost ::系统::错误_ code和boost ::系统:: SYSTEM_ERROR)短耳包括在这些的。自己的名字空间(ASIO ::错误_ code和ASIO :: SYSTEM_ERROR)。这些类的Boost.System版本目前支持用户自定义错误codeS。

"— Boost.Asio uses the Boost.System library to provide support for error codes ( boost::system::error_code and boost::system::system_error). Asio includes these under its own namespace ( asio::error_code and asio::system_error). The Boost.System version of these classes currently supports better extensibility for user-defined error codes.

- 短耳是头文件的,并且在大多数应用中不需要连接反对任何Boost库。 Boost.Asio的总是需要,如果你想使用boost ::线程启动线程您链接对Boost.System库,也对Boost.Thread。

— Asio is header-file-only and for most uses does not require linking against any Boost library. Boost.Asio always requires that you link against the Boost.System library, and also against Boost.Thread if you want to launch threads using boost::thread."

这篇关于作为Boost.Asio的头,只的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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