- Using Boost.Asio
-
How to use Boost.Asio in your applications. Includes information on library dependencies and supported platforms.
-
如何在你的應用程序中使用Boost.Asio庫,以及關于庫依賴和所支持平臺信息。
- Tutorial
-
A tutorial that introduces the fundamental concepts required to use Boost.Asio, and shows how to use Boost.Asio to develop simple client and server programs.
-
介紹使用Boost.Asio必備的基本概念,同時示范如何使用Boost.Aaio開發簡單的客戶端\服務器程序。
- Examples
-
Examples that illustrate the use of Boost.Asio in more complex applications.
-
在更加復雜的應用程序中使用Boost.Asio的示例。
- Reference
-
Detailed class and function reference.
-
類和函數的詳細參考
- Design
-
Rationale and design information for Boost.Asio.
-
Boost.Asio庫的基本原理及設計思路。
支持平臺:
The following platforms and compilers have been tested:
已測試的平臺和編譯器:
- Win32 and Win64 using Visual C++ 7.1 and Visual C++ 8.0.
- Win32 using MinGW.
- Win32 using Cygwin. (__USE_W32_SOCKETS must be defined.)
- Linux (2.4 or 2.6 kernels) using g++ 3.3 or later.
- Solaris using g++ 3.3 or later.
- Mac OS X 10.4 using g++ 3.3 or later.
The following platforms may also work:
以下的平臺可能也可以使用:
- AIX 5.3 using XL C/C++ v9.
- HP-UX 11i v3 using patched aC++ A.06.14.
- QNX Neutrino 6.3 using g++ 3.3 or later.
- Solaris using Sun Studio 11 or later.
- Tru64 v5.1 using Compaq C++ v7.1.
- Win32 using Borland C++ 5.9.2
依賴性:
The following libraries must be available in order to link programs that use Boost.Asio:
以下是使用Boost.Asio 必需的鏈接庫:
- Boost.System for the boost::system::error_code and boost::system::system_error classes.
- Boost.Regex (optional) if you use any of the read_until() or async_read_until() overloads that take a boost::regex parameter.
- OpenSSL (optional) if you use Boost.Asio's SSL support.
Boost.System 中的 boost::system::error_code 和boost::system::system_error 類。
Boost.Regex (可選)。read_until() 或 async_read_until() 函數的重載形式都需要 boost::regex 參數。 如果你使用它們,則需要Boost.Regex庫。
OpenSSL (可選) 。如果需要Boost.Asio支持SSL,則需要OpenSSL庫。
Furthermore, some of the examples also require the Boost.Thread, Boost.Date_Time or Boost.Serialization libraries.
另外,一些例子需要提供Boost.Thread,Boost.Date_Time 或Boost.Serialization 庫的支持。
![[Note]](http://www.boost.org/doc/libs/1_35_0/doc/html/images/note.png) |
Note |
With MSVC or Borland C++ you may want to add -DBOOST_DATE_TIME_NO_LIB and -DBOOST_REGEX_NO_LIB to your project settings to disable autolinking of the Boost.Date_Time and Boost.Regex libraries respectively. Alternatively, you may choose to build these libraries and link to them.
|
注意:
使用MSVC或Borland C++,你可能需要在“工程設置”中分別添加 -DBOOST_DATE_TIME_NO_LIB 和-DBOOST_REGEX_NO_LIB 聲明,分別禁止Boost.Date_Time和Boost.Regex的自動鏈接,當然你也可以這樣做:build這兩個庫,然后鏈接。
Building Boost Libraries
編譯Boost庫:
You may build the subset of Boost libraries required to use Boost.Asio and its examples by running the following command from the root of the Boost download package:
你可以在下載包的根目錄下執行如下的命令來編譯Boost.Asio所必需的Boost庫子集。
bjam --with-system --with-thread --with-date_time --with-regex --with-serialization stage
This assumes that you have already built bjam. Consult the Boost.Build documentation for more details.
這里假設你已經編譯了bjam。請參考Boost.Build文檔以獲得更多信息。
宏
The macros listed in the table below may be used to control the behaviour of Boost.Asio.
下表中的宏用來控制Boost.Asio的狀態。
posted on 2008-04-20 01:14
王曉軒 閱讀(7922)
評論(1) 編輯 收藏 引用 所屬分類:
C\C++