Visual Studio不能“看到”我包括的头文件 [英] Visual Studio can't 'see' my included header files

查看:1085
本文介绍了Visual Studio不能“看到”我包括的头文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Visual Studio 2008中创建了一个空的Demo项目,并将一些现有项目添加到我的解决方案。包括MyHeader.h(其他项目的头)在main.cpp文件,在演示。还在Tools / Option / VC ++目录/包含文件部分中添加了头文件的路径。但intellisense说:文件'MyHeader.h'没有找到当前源文件的目录或在生成系统路径...



如何解决这个问题?

如果您选择 Project ,然后<$ c $> c>所有文件,所有文件都应显示在解决方案资源管理器中,这些文件实际上位于项目映射中,但尚未包含在项目中。如果您右键单击要添加到解决方案资源管理器中的文件,您可以包括它。


I created an empty 'Demo' project in Visual Studio 2008 and added some existing projects to my solution. Included "MyHeader.h" (other project's header) in main.cpp file which is in 'Demo'. Also added header files' path in "Tools/Option/VC++ Directories/Include files" section. But intellisense says: "File 'MyHeader.h' not found in current source file's directory or in build system paths..."

How the problem can be fixed? Thanks.

解决方案

If you choose Project and then All Files in the menu, all files should be displayed in the Solution Explorer that are physically in your project map, but not (yet) included in your project. If you right click on the file you want to add in the Solution Explorer, you can include it.

这篇关于Visual Studio不能“看到”我包括的头文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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