在Win8.1上使用VisualStudio2015 Express
我已经设置了我的外部包含文件的位置 进入项目配置/VC++包括目录: $(VC_IncludePath);"C:\Program Files\Gecode\include"
编译器仍然说“C1083 无法打开包含文件 gecode/int.hh” 编译时:
#include <gecode/int.hh>
但是当我将 C++ 源代码更改为:
#include <C:\Program Files\Gecode\include\gecode\int.hh>
!! 只有下属包含将无法工作 - 这不是一个好的解决方案......
之前提出的其他解决方案不对我有用:
删除 .hh
在包含之后用“”替换<>
最佳答案
问题很可能是您的项目设置的 include directories
不接受(或奇怪地对待)具有嵌入空格的文件路径。
因此,您应该在文件路径名称两边加上引号:
$(VC_IncludePath);"C:\Program Files\Gecode\include"
关于c++ - 错误 "C1083 cannot open include file gecode/int.hh"尽管路径设置正确,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32353209/