boost::asio 筆記

enable_shared_from_this

這個宏的介紹

http://stackoverflow.com/questions/712279/what-is-the-usefulness-of-enable-shared-from-this

在編寫的時候遇到參數imcomplete type錯誤提示

需要添加頭文件:

#include <boost/enable_shared_from_this.hpp>

直接引用boost/smart_ptr.hpp是不行滴

然後就是

undefined reference to `GetAcceptExSockaddrs@32'|這個錯誤

需要添加

libwsock32.a

這個庫,爲什麼?

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章