问题
We are in the process pf switching from VS2005 to VS2012 update 2.
We are building a large number of (mostly console) native C++ (no MFC/ATL) executables that use a couple of common, statically linked libraries. These executables mostly run on Win7 machines but some are also deployed on older XP machines (or the corresponding server versions). Most executables are 32-bit but some are 64-bit.
My questions are as follows:
1) What are the drawbacks, if any, to building all the executables and libraries using the v110_xp toolset, even if they will run on Win7/Server2012?
2) Is it possible to link static libraries built with the v110_xp toolset to an executable built with the v110 toolset? Will those executables run fine on both platforms? How about the other way around?
3) Is there a way to set the platform toolset in a .props
property sheet file? I could not find a way to do so.
4) Are there any other pitfalls or issues with targeting XP and Win7 that I should be aware of?
Thank you!
回答1:
You must not use "Update 2", you must use either "Update 1" or "Update 3" (at least if you consider to use ATL or MFC)!
Update 2 has broken the support for XP! For more info see http://blogs.msdn.com/b/vcblog/archive/2013/05/07/fix-visual-studio-2012-update-2-breaks-windows-xp-targeting-with-atl-and-or-statically-linking-mfc.aspx
Other drawbacks can be found here: http://blogs.msdn.com/b/vcblog/archive/2012/10/08/10357555.aspx
You can either link statically or dynamically!
It seems that is not changeable in the property sheet. For more info, see also Working with Project Properties
来源:https://stackoverflow.com/questions/16818531/mixing-vs2012-platform-toolsets