无法打开源文件:“WIN32”:没有这样的文件或目录 [英] Cannot open source file: 'WIN32': No such file or directory

查看:171
本文介绍了无法打开源文件:“WIN32”:没有这样的文件或目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在VS2008中构建C ++项目时遇到此错误。

Getting this error building a C++ project in VS2008. Very confused what it means, why does it think WIN32 is a file?

推荐答案

转到项目 - > 属性 - > C / C ++ - > 命令行。您最可能在您的 / DWIN32之前有 / I。由于某种原因,一个空的include指令导致/ D蒸发,因此你的错误。

Go to Project-->Properties-->C/C++-->Command line. You most probably have a /I"" before your /D "WIN32". For some reason an empty include directive causes the /D to evaporate hence your error.

转到项目 - > 属性 - > C / C ++ - > 一般 - > 其他包含目录,并确保没有冗余的字符。

Go to Project-->Properties-->C/C++-->General-->Additional include directories and make sure there are no redundant chars there.

例如,当最后一个include目录是对不存在的环境变量的引用时。

It can for example arise when the last include directory is a reference to an environement variable that doesn't exist.

这篇关于无法打开源文件:“WIN32”:没有这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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