C1083:无法打开包含文件:math.h:没有此类文件或目录 [英] C1083: Cannot open include file: math.h: No such file or directory

查看:6696
本文介绍了C1083:无法打开包含文件:math.h:没有此类文件或目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



在google上找到了很多答案,但很遗憾,没有一个答案在工作。



我正在使用Visual Studio 2012。



它说的所有文件都找不到我的电脑在这个文件夹

  C:\Program Files \ Microsoft Visual Studio 11.0 \VC\include 

即使我右键单击include语句并点击打开文档,它需要我到文档,所以它是清楚的,可以看到



我尝试将目录添加到选项中的其他目录字段,但没有解决。



如果我使用include语句和完整路径,如下所示:

  #include< C:\Program Files \ Microsoft Visual Studio 11.0 \VC\include\math.h> 

然后是工作,但如果math.h文件有任何包含语句我需要添加路径



任何想法发生了什么,我还能尝试什么?



:去尝试从头开始创建一个新项目,看看是否有帮助。我可以触摸不应该有的设置

解决方案

右键单击项目,转到属性,然后转到VC ++目录并打开包含目录的编辑器。应该有一个标记为从父级或项目默认值继承的复选框。您将看到Visual Studio包含一些预定义的目录。



如果该框已经打勾,Visual Studio找不到目录,请尝试自己添加这些目录: p>

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


I have a bunch of these errors and am at a dead end.

Found plenty of answers on google but unfortunately none of them work

I am using Visual Studio 2012.

All the files it says is cant find are on my computer in this folder

C:\Program Files\Microsoft Visual Studio 11.0\VC\include

Even when I right click on the include statement and click on 'Open Document ' it takes me to the document, so it is clearly there and can be seen

I tried adding the directory to the 'Additional Directories' field in options too but did not solve it.

If I use the include statement with the full path like so :

#include <C:\Program Files\Microsoft Visual Studio 11.0\VC\include\math.h>

Then is works but if the math.h file has any include statements I need to add the path to them as well and so on.

Any Idea what is happening and what else I can try?

EDIT: Going to try and create a new project from scratch and see if that helps. It is possible I touched a settings I shouldn't have

解决方案

Right-click your project, go to Properties, then go to VC++ Directories and open the editor for Include Directories. There should be a tick box labelled "Inherit from parent or project defaults". You will see that Visual Studio includes some predefined directories.

If the box is already ticked and Visual Studio isn't finding the directories then try adding these directories yourself:

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

这篇关于C1083:无法打开包含文件:math.h:没有此类文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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