如何处理VS文件中发生的编译错误? [英] How to deal with compilation errors occurring at VS files?

查看:174
本文介绍了如何处理VS文件中发生的编译错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用VS2012构建了我的项目。我收到以下错误



I built my project using VS2012. I got the following error

1>c:\program files (x86)\windows kits\8.0\include\um\winnt.h(18629): error C2440: '=' : cannot convert from 'void *' to 'PTP_POOL'





这不应该是一个非常难以解决的问题。但现在的问题是,这不是我的文件,而是Visual Studio的。我无法更新其文件。



我该怎么办?



我是什么尝试过:



我用谷歌搜索但没有得到他们的帮助。



This shouldn't be a very hard issue to fix. But now the problem is that this is not my file, but Visual Studio's. I can't update its file.

How can I do?

What I have tried:

I googled it but got no help from them.

推荐答案

这可能是由包含头文件的顺序的一些问题引起的。



检查错误消息上方的行,看看你的哪些源文件实际上是编译。然后检查该文件中的包含和/或使用绿色的改善问题链接编辑您的问题,以便我们也能看到它。请注意,真正的问题可能也隐藏在上面提到的源文件中包含的一个头文件中。



此类错误的常见来源是忘记当使用预编译的头文件时,在C ++源文件的顶部包含 stdafx.h
This is probably sourced by some problems with the order of including header files.

Check the line(s) above the error message to see which of your source files is actually compiled. Then check the includes on that file and/or edit your question using the green 'Improve question' link so that we can see it too. Note that the real problem may be also buried in one of your header files that is included by the above mentioned source file.

A common source for such errors is forgetting to include stdafx.h on top of a C++ source file when using pre-compiled headers.


我确认它来自VS-2012本身。虽然我不知道如何修复它,但它内部肯定存在一些缺陷。最后,我安装了VS-2015,错误消失了。所以,这不是源代码中的问题,而是VS本身。

判断缺少Windows SDK导致MSDN论坛中出现此错误。我按照建议安装了Windows 7.0 SDK,但没有帮助。
I confirmed that it is from VS-2012 itself. There must be some deficit inside it, although I don't know how to fix it. Finally, I installed VS-2015 and the errors are gone. So, it's not the problem inside the source codes, but the VS itself.
It's judged that lacking Windows SDK causing this error in MSDN Forum. I installed Windows 7.0 SDK as suggested, but it doesn't help.


这篇关于如何处理VS文件中发生的编译错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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