我下载了boost。网站上的说明是这样说的:
In this example, you would point your linker at C:\lib\boost\lib and tell your compiler to search for includes in C:\lib\boost and include them using the second boost directory, for example #include "boost/filesystem.hpp
我究竟如何指向我的链接器和编译器?
我在 Windows 7 上的 Eclipse 中工作。
最佳答案
编译器 : 要添加包含目录,请在以下位置添加 boost 路径:
project properties->C\C++ Build->Settings->Directories->GCC C++ Compiler->Directories
注意:添加文件夹“boost”所在的文件夹,这样就可以了
#include "boost/smart_ptr.hpp"
链接器 :要添加库路径,请在以下位置添加搜索路径(指向所有 lib 文件所在的位置):
project properties->C\C++ Build->Settings->Directories->MinGW C++ Linker->Libraries
(这假设您使用的是 MinGW 工具链。在其他工具链上应该相同)。
干杯
关于compiler-construction - 如何在 Eclipse 和 Windows 中指向我的编译器和链接器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4485076/