我想使用boost smart_ptr库.我不想要任何其他库,因为我试图保持我的项目很小.
当我添加smart_ptr图书馆时,我得到了config.hpp无法找到标题的投诉.我添加了该文件,然后我的编译器说它找不到assert.hpp标题.之后我放弃了,只包括了整个boost库.
如果我想使用其中一个子库(例如,smart_ptr),是否必须使用一组最小的boost库?
#include我使用的声明是:
#include <boost/smart_ptr/shared_ptr.hpp>
Run Code Online (Sandbox Code Playgroud)
我的目录结构看起来像这样
MyProject/
main.cpp
MyLib/
. . . My library code is here. . .
boost/
boost/
smart_ptr/
smart_ptr.hpp
. . . All other boost sub-libraries are also here. . .
Run Code Online (Sandbox Code Playgroud)