c++ - Intellisense 无法打开源文件 "*.h"

标签 c++ visual-studio-2012 configuration

我不知道可能发生了什么。我正在删除一些我添加到 VC 文件夹和附加依赖项(我添加的 OpenGL 库)的库,然后当我尝试编译我的程序时,我收到 100 个错误。问题是我当前的项目无法识别某些标准 header 。这是我得到的:

#include <Windows.h>    <-----Error from title
#include <stdio.h>      <-----Error from title
#include <stdlib.h>     <-----Error from title
#include "stdafx.h"     <-----OK
#include <CommCtrl.h>   <-----Error from title

我创建了一个新项目来比较它的属性,但没有发现任何遗漏。有没有人知道为什么项目不使用这些 header ?

最佳答案

确保在 VC++ 目录->Include Directories 下有所有这些路径:

$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);‌

关于c++ - Intellisense 无法打开源文件 "*.h",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17039251/

相关文章:

visual-studio-2012 - Bootstrap 3.3.0和Visual Studio 2012

c# - 创建 Windows 应用商店应用程序时出现问题。 (Windows 8)

swift - 如何在 Swift XCTestCase 中输出 Realm fileURL?

c++ - 尝试使用 C++ 创建工厂方法时出错

c++ - 无法将 unsigned int 转换为 unsigned int & (Boost adjacency iterator pointer)

c++ - 模板化重复类型错误

c# - qt 到 c# : operator mean within struct 是什么

c# - Windows Phone 8 SDK 不刷新页面的 XAML 部分

c - 如何从 .ini 文件中读取?

mysql - Linux Mint 在系统启动时缓慢触发对 mysql 的查询