2016-09-30 24 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