[英]error “C1083 cannot open include file gecode/int.hh” although paths set correctly
在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"
解決方案是:將VisualStudio版本從2015年還原到2010年,並應用補丁VS10-KB983233-x86.exe,然后將gecode-include-dir輸入到:項目屬性/配置/ C / C ++ / AdditionalIncludeDirs
不起作用:在prj / config / VC ++ Dirs / IncludeDirs中輸入gecode路徑!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.