IntelliSense:无法在包含路径中打开源文件 [英] IntelliSense: Cannot open source file in include path

查看:208
本文介绍了IntelliSense:无法在包含路径中打开源文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Visual Studio 2013 Professional创建C ++项目,但遇到了从未遇到过的问题.

I am authoring a C++ project with Visual Studio 2013 Professional and I encountered a problem I have never encountered before.

在我的一个源文件中,我包括一个第三方头文件,如下所示:

In one of my source files I am including a third-party header file like this:

#include 'sqlcli1.h'

此文件(以及同一组的其他文件)位于外部目录(不在VS解决方案中),因此我已使用 Additional将其添加到搜索路径中在项目的属性下包含路径.

This file (and other files of the same set) are located in a an external directory (not in the VS solution), so I have added it to the search path using Additional include paths under project's Properties.

解决方案可以成功构建,因此,我可以确保正确引用了我的外部头文件.但是,IntelliSense仍然看不到,并且抱怨无法打开源文件'sqlcli1.h'.它不会阻止我构建项目,但是会使编辑变得更加困难.

The solution does build succesfuuly, so I am sure my external header file is referenced correctly. IntelliSense, however, still doesn't see it and complains about not being able to open source file 'sqlcli1.h'. It does not prevent me from building the project, but it makes editing it much harder.

为什么会发生这种情况,我该怎么办?

Why does this happen and what should I do?

推荐答案

您是否尝试删除解决方案目录中的IntelliSense文件?连同"ipch"目录,它可能多达几百MB. VS将重建IntelliSense文件,这可能有助于解决您的问题.

Have you tried to delete the IntelliSense file in your solution directory? It may be as large as a few hundred MBs, along with the "ipch" directory. VS will rebuild the IntelliSense file and it may help solve your problem.

这篇关于IntelliSense:无法在包含路径中打开源文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆