[英]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.