[英]Minimal boost.org includes to use just one sub-library
我想使用boost smart_ptr
庫。 我不想要任何其他庫,因為我試圖保持我的項目很小。
當我添加smart_ptr
庫時,我得到了無法找到config.hpp
標頭的抱怨。 我添加了該文件,然后我的編譯器說它無法找到assert.hpp
標頭。 之后我放棄了,只包括了整個boost庫。
如果我想使用其中一個子庫(例如, smart_ptr
),是否必須使用一組最小的boost庫?
我使用的#include
語句是:
#include <boost/smart_ptr/shared_ptr.hpp>
我的目錄結構看起來像這樣
MyProject/
main.cpp
MyLib/
. . . My library code is here. . .
boost/
boost/
smart_ptr/
smart_ptr.hpp
. . . All other boost sub-libraries are also here. . .
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.