“stdafx.h”: No such file or directory

一般原因是建工程的时候选择了空工程,然后添加现有源文件(含stdafx.cpp) 或者 修改了已有的stdafx.cpp 或者 从项目排除该文件后重新添加,需单独设置stdafx.cpp属性:

  把整个工程属性 -> C/C++ -> 预编译头选为“使用预编译头(/Yu)”,解决方案里右键stdafx.cpp->属性->c/c++->预编译头选为“创建预编译头(/Yc)”,然后重新编译解决方案即可。

  或许也可以工程属性 -> C/C++ -> 常规 -> 附加包含目录 ->添加$(ProjectDir);


“XXXX.h”: No such file or directory,一般引用了某公共目录:

  工程属性 -> C/C++ -> 常规 -> 附加包含目录 -> 添加该公共目录。

“stdafx.h”: No such file or directory的更多相关文章

  1. fatal error C1083: 无法打开包括文件:“qedit.h”: No such file or directory

    VS2010编译 DirectShow一些项目时遇到 错误:fatal error C1083: 无法打开包括文件:“qedit.h”: No such file or directory 解决方法: ...

  2. (转)win7 64 安装mysql-python:_mysql.c(42) : fatal error C1083: Cannot open include file: 'config-win.h': No such file or directory

    原文地址:http://www.cnblogs.com/fnng/p/4115607.html 作者:虫师 今天想在在win7 64位环境下使用python 操作mysql 在安装MySQL-pyth ...

  3. win7 64 安装mysql-python:_mysql.c(42) : fatal error C1083: Cannot open include file: 'config-win.h': No such file or directory

    今天想在在win7 64位环境下使用python 操作mysql 在安装MySQL-python 时报错: _mysql.c _mysql.c(42) : fatal error C1083: Can ...

  4. 无法打开包括文件:“windows.h”: No such file or directory

      VS2012 出现如下错误: 无法打开包括文件:"windows.h": No such file or directory   解决办法,将 C:\Program Files ...

  5. dxut.h(29): fatal error C1083: Cannot open include file: 'dxsdkver.h': No such file or directory

    从网上download一个三维演示模型的软件编译发现报找不到dxsdkver.h文件,网上查阅这是MS的DirectX sdk中的库文件,于是先download DirectX SDK 安装之后,配置 ...

  6. OGRE: "OgreOverlaySystem.h": No such file or directory

    这两天学习OGRE,遇到"OgreOverlaySystem.h": No such file or directory的错误. 这是由于OGRE提供的例子过老,和SDK版本不一致 ...

  7. Solve error: Cannot open include file: 'X11/Xlocale.h': No such file or directory

    When you use FLTK with VS2010, you may get the error: fatal error C1083: Cannot open include file: ' ...

  8. linux e2fsprogs安装解决uuid/uuid.h: No such file or directory错误

    linux查看某个包是否安装    dpkg -l libuu*    用gcc编译发生nux 错误:fatal error: uuid/uuid.h: No such file or directo ...

  9. fatal error: openssl/sha.h: No such file or directory 解决方案

    出现这个或者fatal error: openssl/名单.h: No such file or directory.都是没有安装libssl-dev- libssl-dev包含libraries, ...

随机推荐

  1. 计算alert弹出框的次数

    (function() { var oldAlert = window.alert, count = 0; window.alert = function(a) { count++; oldAlert ...

  2. php课程---Ajax(老师详解)

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  3. Windows内核 字符串基本操作

    驱动程序中字符串操作涉及到ASCII字符串.宽字符串,还有DDK定义的ANSI_STRING数据结构和UNICODE_STRING数据结构. 1)ASCII字符串和宽字符串 在应用程序中使用两种字符: ...

  4. ExtJS笔记 Using Events

    Using Events The Components and Classes of Ext JS fire a broad range of events at various points in ...

  5. loadrunner获取返回值为乱码

    找了很多方法,utf-8也设置了,还是不行,只有有转码方法了 web_reg_save_param("res2", "LB=\"msg\":\&quo ...

  6. Boyer-Moore algorithm

    http://www-igm.univ-mlv.fr/~lecroq/string/node14.html Main features performs the comparisons from ri ...

  7. CentOS7安装mysql5.6.23

    ============安装glibc版本============== 一.下载glibc版本的Mysql mysql-advanced-5.6.23-linux-glibc2.5-x86_64.zi ...

  8. JS中的_proto_(2)

    function God(){} function Foo(){ this.name="Foo~~"; } Foo.prototype = new God(); function ...

  9. 当select框变化时 获取select框中被选中的值

    DOM <select name="course"> <option value="1">1</option> <op ...

  10. asp.net mvc 控制器中操作方法重载问题 解决

    Controllers: public ActionResult Index() { return View(db.GuestBooks.ToList()); } // // GET: /Guest2 ...