未解决的包含:<boost/python.hpp> 在 Eclipse 中

Unresolved inclusion: <boost/python.hpp> in Eclipse

我已经在 C:\boost 中安装了 Boost Python,其中安装是从 C:\Program Files\boost_1_65_1 作为根目录的 运行。

|C:\
|--|boost
|--|--|bin
|--|--|share

|C:\
|--|Program Files
|--|--|boost_1_65_1

C:\MinGW\bin 已添加到系统的 PATH 中。在 Eclipse 中,#include <boost/python.hpp> 或与 <boost\[directory]> 相关的任何内容不断返回 'Unresolved inclusion' 错误。

我已将 C:\MinGW\bin 添加到系统的 'Path'。在 Eclipse 中,我将以下内容添加到 'Paths and Symbols' 中的 GNU C++ 'Include directories':

C:\boost
C:\Program Files\boost\boost_1_65_1\libs
C:\Program Files\boost\boost_!_65_1\boost
C:\MinGW\lib\gcc\mingw32.3.0\include\c++

需要编辑哪些设置?

bjam --debug-configuration 必须来自根文件夹运行

C:\Program Files\boost\boost_1_65_1

编译结束,前往

Project Properties > C/C+ Build

并将链接添加到编译器包含路径(在我的例子中是 Cross G++ 编译器 > 包含)。现在应该可以从 #include <boost/whatever>.

访问 boost 库