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
If you don't want the dependancies to the other boost libraries then you can use the non-boost (i think otherwise identical asio) library from here: http://think-async.com/
发布评论
评论(1)
如何使用它取决于您想要做什么,;-)。
该文档位于:
http://www.boost。 org/doc/libs/1_46_1/doc/html/boost_asio.html
您会发现很多适合您需求的示例。
对于构建,您应该注意库依赖关系取决于您是在 Windows 还是 Linux 上运行。请参阅此处
http://www.boost.org/ doc/libs/1_46_1/doc/html/boost_asio/using.html
特别是:
如果您不希望依赖于其他 boost 库,那么您可以从这里使用非 boost(我认为其他方面相同的 asio)库: http://think-async.com/
有关其他文档的来源,请参阅以下问题:Boost:asio 的最佳文档?
例如,要打开串行端口,您可以编写如下内容:
How you use it depends on what you want to do, ;-).
The documentation is found here:
http://www.boost.org/doc/libs/1_46_1/doc/html/boost_asio.html
You will find lots of examples that should suite your needs.
For building, you should note that the library dependancies depend upon whether you are running on windows or linux. See here
http://www.boost.org/doc/libs/1_46_1/doc/html/boost_asio/using.html
In particular:
If you don't want the dependancies to the other boost libraries then you can use the non-boost (i think otherwise identical asio) library from here: http://think-async.com/
For sources of other documentation see this question on SO: Best documentation for Boost:asio?
As an example, to open a serial port you might write something like this: