Recently, some of our customers reported a bug in Visual Studio 2012 Update 2 that breaks Windows XP targeting with C++ in some scenarios. Specifically, applications using ATL and/or statically linking with MFC will get the following error when run on Windows XP:
“The procedure entry point InitializeCriticalSectionEx could not be located in the dynamic link library kernel32.dll.”
This issue has been fixed in Visual Studio 2012 Update 3 RC1. If you encounter this issue, please download and install this update.
How did this make it out of QA? Were there no test cases that covered XP with ATL and/or static MFC, or was there a process failure?
I'd like to echo John's question. A lot of people are relying on XP targeting – please don't treat the feature as a second class citizen.
The C++11 November CTP features won't even make it to update 3. :D How pathetic.
"Install a beta update to fix a bug in the released update."
How about no. Apply the fix to the release version and provide a real update.
Also, just to mention…. Clang is already implementing C++14.
Just so everybody knows, if you plan to revert to Update 1 instead of going ahead with pre-release Update 3, you're probably going to break your VS install.
connect.microsoft.com/…/uninstalling-vs2012-update-2-and-repair-of-vs-results-in-atl-files-missing
Does this Update 3 RC1 have a go-live license? The other Update 3 prereleases didn't and were thus not a feasible workaround for this problem.
@Lars From the Statement of Support for RC3
"Visual Studio 2012 Update 3 RC and Team Foundation Server 2012 with Update 3 RC are “go-live”. "
@John, Richie Hindle
We took a look at our process and test cases and made changes to avoid this in the future.
@Hoikas
It is a release candidate :)
@Haha
We would love to hear more feedback around C++ 11 and your experiences. Ping me at ebattali@microsoft.com!
"It's not a bird! It's a _vulture_."
Point is, this "fix" is pretty lame.
I just tried this with my app and now the xp system says the msvcr110.dll is not a valid windows image. Update 3 did not updated the dlls in my vs redistributables directory, they are still dated from 11/2012.
@J Williams
It might be that the redistributables are deliberately left unchanged; I don't think it's wise to make pre-release software redistributable.
== email me!
Proper language please Eric.
Perhaps the reason it snuck through is due to the misuse of WINVER as mentioned in this older post: blogs.msdn.com/…/10282397.aspx
Eric Battalio, well what more feedback do you need about C++11? The feedback is that we want to see C++11 implemented. And we would have expected that the November CTP features would at least make it to VS Update2, but now they're not even making it to Update3. And while you're struggling to implement C++11, Clang has finished doing that and is already picking up the next C++14 standard.
@Haha
I agree with you.
I want C++11 immediately.
@Hoikas
Hi Hoikas, do you mean the fix does not work for you, or do you have some coding related feedback related to the fix?
@J Williams
For the redist, what files are you looking for? I see these are correctly updated: C:Program Files (x86)Microsoft Visual Studio 11.0VCredist1033vcredist*.exe, C:Program Files (x86)Microsoft Visual Studio 11.0VCredist<arch>Microsoft.VC110.MFCmfc*.dll, C:Program Files (x86)Microsoft Visual Studio 11.0VCredist<arch>Microsoft.VC110.ATLatl*.dll, C:Program Files (x86)Microsoft Visual Studio 11.0VCredistDebug_NonRedist<arch>Microsoft.VC110.DebugMFCmfc*.dll, C:Program Files (x86)Microsoft Visual Studio 11.0VCatlmfclib*.lib, C:Program Files (x86)Microsoft Visual Studio 11.0VCatlmfclib*.pdb, C:Program Files (x86)Microsoft Visual Studio 11.0VCatlmfclib<arch>*.lib, C:Program Files (x86)Microsoft Visual Studio 11.0VCatlmfclib<arch>*.pdb, C:WindowsSysWOW64mfc*.dll, C:WindowsSysWOW64atl*.dll, C:WindowsSystem32mfc*.dll, C:WindowsSystem32atl*.dll, C:Windowssymbolsdllatl*.pdb, C:Windowssymbolsdllmfc*.pdb.
Did you setup your windows subsystem correctly in the Property Pages?
I'm sad to say that even with Update 3 RC, I'm still getting the same error. I tried going back to the basics and creating a C++ app that declared InitializeCriticalSectionEx and it fails still with the same message.
@tim, did you set the Platform Toolset to vc110_xp?
> We would love to hear more feedback around C++ 11 and your experiences
Oh, I like C++11 a lot. I enjoy working with it when I'm using Clang and GCC.
Why? Are you considering adding support for it in VC++? Like, this decade?
Remember when you released VC11, how adamant everyone on the VC++ team were that THIS TIME, FINALLY, you would ship feature updates out of band. We would see improved C++11 support *without* having to wait for, and then buy, VC12.
So far, you haven't delivered on that. Oh, sure, we've seen a preview, but nothing final, nothing shippable, nothing you yourselves want us to use.
While Clang is well on the way to having complete C++14 support, the VC++ team is asleep. As they've been for the last 5 years. Oh, that's right, 12-18 months ago, you woke up for a little bit, to tell us that NOW YOU MEANT BUSINESS. And then, well, that was about it. Back to the usual coma.
I guess that just about sums up most of our experiences with C++11.
As to when C++11 support is coming, if anybody wants to play connect-the-dots with these somewhat selective quotes, feel free.
http://blog.zorinaq.com/?e=74
"We just can't be … to implement C11 (sic) support, and variadic templates were just too hard to implement in a year. (But ohmygosh we turned "^" into a reference-counted pointer operator."
"I might disagree with the priorities of our compiler team, and I might be mystified by why certain C++ features took longer to implement for us than for the competition"
blogs.msdn.com/…/some-thoughts-on-a-comment-about-vs-2012-3.aspx
"Update 3 is likely the last of the updates to the VS 2012 line"
So prepare to fork out for Visual Studio vNext, and then wait for vNext Update 1 which will re-introduce Legacy Application Targeting for Downstream Operating Systems (RTM will only target operating systems that can run Metro apps).
Hopefully Microsoft don't rewrite the Intellisense engine and find C++11 support too hard to implement (a la VS2010 and C++/CLI).
Fingers crossed the UI gets reverted to something sensible.
I guess we will have to wait for the next VS. From: connect.microsoft.com/…/codename-milan-new-c-features-still-missing-in-vs-2012-update-2
"We do not plan to release new compiler features as part of the Visual Studio 2012 updates."
I guess I am glad I didn't upgrade my VS 2010 to VS 2012. I am quite disappointed with Microsoft's commitment to "native" C++.
@Well
There is still a nonzero probability for MS to deliver us updated compiler as part of WindowsSDK not as a VS Update. Herb Sutter reasured there will be something coming either this or next month (so his earlier promise about delivering in the first half of 2013 will hold)
Tomas, where and when did he reassure that?
Well, several places, including on twitter (@herbsutter)
26 Mar See you at Build 2013, June @ Moscone… still "first half" :)
2 Apr @tomkirbygreen As mentioned in that talk, we'll share more news in 1H13 = more news within next 3mo, promise
18 Apr @michaelpricedev Assume you meant ":-)" ;) 198x-2011: 1 release per 2-3 years. Sep/12-Apr/13: 1 release + 2 updates + 1 CTP. #watchthisspace
It's dissapointing and disillusioned, what MS done with update 2. XP is living and very popular (more popular, than the following systems). thank god, we were not delivering new compiled software. MS, please "testing before placing" an update.
With Update 3 RC1, I'm still having this problem, using vc110_xp. I reverted to vc100, and it works fine on XP.
My mistake, apparently the problem with my application was not related to InitializeCriticalSectionEx, since I'm not using that function. My application still crashes on XP when built for the vc110_xp target, however.
@Aaron
Aaron, how does the crash looks like? Do you get an error about InitializeCriticalSectionEx at startup? If not, it would help to post the callstack.
-Ion Todirel
VC++ Libs Devlopment Team