首页 > 解决方案 > 在 Eclipse 中设置 boost 库路径时出错

问题描述

在Eclipse中设置boost库的路径后遇到了问题。我收到如下错误:

No such file or directory
compilation terminated.

这是我的日志

15:32:06 **** Rebuild of configuration Debug for project Demo ****
Info: Internal Builder is used for build
g++ "-IC:\\boost\\boost_1_66_0" "-includeC:\\boost_1_66_0" -O0 -g3 -Wall -c -fmessage-length=0 -o "src\\Demo.o" "..\\src\\Demo.cpp" 
cc1plus: fatal error: C:\boost_1_66_0: No such file or directory
compilation terminated.

15:32:06 Build Finished. 0 errors, 0 warnings. (took 147ms)

标签: c++eclipseboost

解决方案


看起来您的路径未与 -l 标志和 -include 标志对齐。它应该是“-includeC:\boost\boost_1_66_0”,或者是 boost 根目录的正确路径。

有关更多信息,请参阅此boost 文档


推荐阅读