简体   繁体   English

IntelliSense:无法在C ++中打开源文件“curl.h”

[英]IntelliSense: cannot open source file “curl.h” in C++

I am unable to compile my C++ project. 我无法编译我的C ++项目。

IntelliSense: cannot open source file "curl.h" in C++ IntelliSense:无法在C ++中打开源文件“curl.h”

I tried adding that file to the "Header Files" folder in Solution Explorer: no change. 我尝试将该文件添加到解决方案资源管理器中的“Header Files”文件夹中:没有更改。 I was unable to add it to the "Source Files" folder. 我无法将其添加到“源文件”文件夹中。

How can I fix this? 我怎样才能解决这个问题?

  • Right click on your project 右键单击您的项目
  • select Properties 选择属性
  • Expand Configuration Properties 展开配置属性
  • Click on the VC++ Directories 单击VC ++目录
  • Add $(ProjectDir) into the "Reference Directories" item 将$(ProjectDir)添加到“引用目录”项中

Under Visual Studio 2010/2012/2013 在Visual Studio 2010/2012/2013下

  • Right click on your project 右键单击您的项目
  • select Properties 选择属性
  • Expand Configuration Properties 展开配置属性
  • Click on the VC++ Directories 单击VC ++目录
  • Add the path to your file, as well as $(ProjectDir), into the "Reference Directories" item 将文件的路径以及$(ProjectDir)添加到“Reference Directories”项中

If you've added the header file correctly, then sometimes intellisense can be corrupted and you will need to delete the .ncb file in you project. 如果您已正确添加头文件,则有时intellisense可能已损坏,您需要删除项目中的.ncb文件。 Once this is done, restart VS and see if this works. 完成后,重新启动VS并查看是否有效。 The .ncb file is the intellisense database file so if you delete this, VS will rebuild it. .ncb文件是智能感知数据库文件,因此如果删除它,VS将重建它。

  • Under Visual Studio 2010/2012/2013 在Visual Studio 2010/2012/2013下

  • Right click on your project select 右键单击您的项目选择

  • Properties Expand Configuration 属性展开配置
  • Properties Click on the VC++ 属性单击VC ++
  • Directories Add the path to your file,as well as $(VCInstallDir)lib; 目录添加文件的路径,以及$(VCInstallDir)lib; , into the "Reference Directories" item ,进入“参考目录”项目

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM