compiler-construction - 如何在 Eclipse 和 Windows 中指向我的编译器和链接器?

标签 compiler-construction boost windows-7 linker eclipse-cdt

我下载了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/

相关文章:

c++ - 具有不同 C/C++ 运行时库的 exe 和 dll 之间的接口(interface)

windows-7 - Powershell COM 对象 HRESULT 异常 : 0x80010108 (RPC_E_DISCONNECTED)

c# - 晦涩的编译器的 lambda 表达式翻译

C++:迭代器适配器将迭代器限制在一系列迭代器中?

gcc - 仅编译thumb1

c++ - boost optional 和 std::experimental optional assignment 之间的区别

bash - 无法解决 "syntax error near unexpected token ` fi'"-隐藏控制字符 (CR)/Unicode 空白

windows-7 - 如何在 Win7/10 上为 OpenVPN 客户端创建第二个 TAP 适配器

c - 代码有问题或者我的 IDE/comp 有问题吗?

c++ - 初学者 C++ 问题