2016-09-30 25 views
1

我有窗户包\ 8.1 \包括\恩\ gdiplusheaders.h &等等 - 但我们从VS2013升级到VS2015和我得到无尽的编译器错误,如:我从哪里获得VS21015的正确gdi + C++包装?

1>c:\program files (x86)\windows kits\8.1\include\um\gdiplusheaders.h(695): error C2220: warning treated as error - no 'object' file generated 
1>c:\program files (x86)\windows kits\8.1\include\um\gdiplusheaders.h(695): warning C4458: declaration of 'nativeCap' hides class member 
1> c:\program files (x86)\windows kits\8.1\include\um\gdiplusheaders.h(695): note: to simplify migration, consider the temporary use of /Wv:18 flag with the version of the compiler with which you used to build without warnings 
1> c:\program files (x86)\windows kits\8.1\include\um\gdiplusheaders.h(710): note: see declaration of 'Gdiplus::CustomLineCap::nativeCap' 
1>c:\program files (x86)\windows kits\8.1\include\um\gdiplusimageattributes.h(364): warning C4458: declaration of 'nativeImageAttr' hides class member 
1> c:\program files (x86)\windows kits\8.1\include\um\gdiplusimageattributes.h(364): note: to simplify migration, consider the temporary use of /Wv:18 flag with the version of the compiler with which you used to build without warnings 
1> c:\program files (x86)\windows kits\8.1\include\um\gdiplusimageattributes.h(378): note: see declaration of 'Gdiplus::ImageAttributes::nativeImageAttr' 
1>c:\program files (x86)\windows kits\8.1\include\um\gdiplusmatrix.h(296): warning C4458: declaration of 'nativeMatrix' hides class member 
1> c:\program files (x86)\windows kits\8.1\include\um\gdiplusmatrix.h(296): note: to simplify migration, consider the temporary use of /Wv:18 flag with the version of the compiler with which you used to build without warnings 
1> c:\program files (x86)\windows kits\8.1\include\um\gdiplusmatrix.h(310): note: see declaration of 'Gdiplus::Matrix::nativeMatrix' 

现在,看起来我可以使用/ Wv标志 - 但我的猜测是我需要包含当前版本的GDI + C++包装的Windows SDK的更新版本。

但是,我没有发现这样的结果,即谷歌。

更新: 我只发现越来越多这种类型的混乱。 我清理从Gdiplus.h的警告,确保我#prama警告(禁用:4458)#include'ing gdiplus.h之前,但我发现:

1>c:\users\steve\vault\cimex cad-cam\17.0\mfc toolbox\cstring utilities.h(441): warning C4459: declaration of 'chQuote' hides global declaration 
1> c:\users\steve\vault\cimex cad-cam\17.0\mfc toolbox\cstring utilities.h(441): note: to simplify migration, consider the temporary use of /Wv:18 flag with the version of the compiler with which you used to build without warnings 

从我自己的代码,其中VS2015正在考虑自由函数参数与c:\ Program Files(x86)\ Microsoft Visual Studio 14.0 \ VC \ atlmfc \ include \ statreg.h冲突 - 它在名称空间ATL中定义了一个全局变量!

真是一团糟!这真的是标准组织想要的吗?!这太疯狂了!现在,每个变量或参数都必须避免与来自Windows或MFC/ATL其他部分的完全不相关的垃圾的名称冲突,因为可能某处某处可能隐藏了一个全局的......老兄!这是DUMB。 :(

+0

我发现程序文件(x86)下还有其他的窗口工具包 - 但不清楚如何选择一个编译正确...? – Mordachai

+0

[如何:在Windows桌面应用程序中使用Windows 10 SDK](https://msdn.microsoft.com/en-us/library/mt186161.aspx)。应该这样做,如果确实是一个马使用更新后的SDK。 – IInspectable

+0

该死的 - 我认为它也是这样的 - 并且发现这个界面 - 但我唯一的选择是“8.1”,尽管我在Program Files(x86)下看到了其他SDK。 :( – Mordachai

回答

0

看来,作为附带的软件开发工具包的确是充满警告在/ W4 要么必须回落到/ W3或调用各种SDK头前覆盖各种警告

仅供参考。 - VS2013我可以用/ W4编译这些相同的SDK,所以大概会有更多的警告,或者他们会发现更多的违规。

+0

它可以帮助如果你想downvote这个指定为什么?如果你有更好的答案 - 随时添加它,嗯? – Mordachai

+0

我不知道为什么;我可以确认,即使使用VS2013,几乎所有的Windows API头文件都会发生这种情况。我认为这与将/ W4与/ Tc结合在一起,但是这个问题证明了否则......我敢肯定类似的问题在这里被问到过。 – andlabs