VC2010-SP1 Win7 32-bit - error C2338: CVarTypeInfo< char > cannot be compiled with /J or _CHAR_UNSIGNED flag enabled

给你一囗甜甜゛ 提交于 2019-12-13 08:59:42

问题


I am getting following error on VC2010-SP1 Win7 32-bit. I tried for HotFix but it is no longer available here https://support.microsoft.com/en-us/kb/982517. Can anyone help? Thanks

ClCompile: stdafx.cpp C:\Program Files\Microsoft Visual Studio 10.0\VC\atlmfc\include\atlcomcli.h(1751): error C2338: CVarTypeInfo< char > cannot be compiled with /J or _CHAR_UNSIGNED flag enabled

C:\Program Files\Microsoft Visual Studio 10.0\VC\atlmfc\include\atlcomcli.h(1774): error C2338: CVarTypeInfo< char* > cannot be compiled with /J or _CHAR_UNSIGNED flag enabled

c:\Program Files\Microsoft SDKs\Windows\v7.0A\include\odbcss.h(430): error C2371: 'WCHAR' : redefinition; different basic types c:\Program Files\Microsoft SDKs\Windows\v7.0A\include\winnt.h(344) : see declaration of 'WCHAR'

Build FAILED.


回答1:


I tried for HotFix but it is no longer available here https://support.microsoft.com/en-us/kb/982517.

It's still available, but listed as requiring a support call (as many KBs do by default). You can however ask for a download link by email.

Since you run SP1 of VS2010, KB 982517 points to KB 2545588 for the fix. Following How can you download a hotfix without contacting Microsoft? which still works nowadays, click...

      http://support.microsoft.com/hotfix/KBHotfix.aspx?kbnum=2545588&kbln=en-us

...accept the terms, and provide a valid email where you'll receive the download link. Be prepared for a massive download to the tune of 270+ MB. If the hotfix doesn't fix it, or breaks anything else, don't expect much support from MS (since you just agreed to their terms in a previous step ;-)).



来源:https://stackoverflow.com/questions/38183598/vc2010-sp1-win7-32-bit-error-c2338-cvartypeinfo-char-cannot-be-compiled-wi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!