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

后端 未结 8 1197
走了就别回头了
走了就别回头了 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:12

    The usual work-around for this problem is to build your own custom version of the CRT. There are instructions for it here. You'll just need to edit the code to ignore EncodePointer and DecodePointer. (There should already be a #define for that.)

    There are two other minor things you'll need to do:

    • Go to the Linker->Additional Library Directories setting and set C:\Microsoft Visual Studio 9.0\VC\lib as the first path to search. (I'm assuming you used the default install directory, otherwise change as appropriate.)
    • Change the subsystem version, in the PE header, to 5.00 (use the free CFF Explorer Suite if you don't have another tool handy for it).

    That should allow your program to run on Windows 2000 as well as later versions.

提交回复
热议问题