Can I use Visual Studio 2010's C++ compiler with Visual Studio 2008's C++ Runtime Library?

后端 未结 8 1196
走了就别回头了
走了就别回头了 2020-11-27 02:51

I have an application that needs to operate on Windows 2000. I\'d also like to use Visual Studio 2010 (mainly because of the change in the definition of the auto

8条回答
  •  鱼传尺愫
    2020-11-27 03:14

    The very simplest solution is just to set the Platform Toolset in project settings in VS2010 to v900, which will use the Visual Studio 2008 libraries and compiler. This also means you lose C++0x features like auto, but to be honest, working around that with some typedefs is probably easier than building your own version of the CRT or other more complicated solutions. Alternatively, just use VS2008! I don't know if there are other C++0x features that are critical to your application though, you didn't mention - other than std::regex, which I think is still in the v900 toolset under the technical report 1 namespace (std::tr1::regex).

    Just from the impression I get, I would predict the inconvenience of getting the VS2010 libraries to run on XP SP1 is greater than the convenience of C++0x features, so overall it wouldn't be worth it.

提交回复
热议问题