views:

145

answers:

2

I need to modify the C runtime which ships with VS2010 because the 2010 CRT relies on functions released in Windows XP SP2, and I need to be able to deploy to Windows 2000.

Specifically, I need to remove any and all calls to EncodePointer and DecodePointer.

The source for the C runtime is included in C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\crt\src, so it seems like it should be possible to build the runtime after slightly modifying the source.

Oh, I don't need to be able to build the dynamic versions of the runtime -- static versions only. (I cannot rely on the user installing the CRT on their system either).

With VS2008 and earlier, there was a tutorial in MSDN describing how to build the CRT, but I can't seem to find it for 2010.

Is such a thing possible?

A: 

If it is a option, I would consider using the VC++ 2008 toolset within VS2010 instead of building a custom CRT. The procedure is explained here.

Samuel_xL
That's what I'm already doing. The reason that really stinks is that I'd like to use things like `std::unique_ptr` and move semantics, which are available only with VS 2010's compiler.
Billy ONeal
I agree, I mentioned this solution just in the case you had not thought of it. Good luck.
Samuel_xL
+3  A: 

Here's an MSDN link. It looks like you have to do it yourself in VS2010.

You can use the following compiler and linker options to rebuild the MFC, CRT, and ATL libraries. Starting in Visual C++ 2010, scripts for rebuilding these libraries are no longer shipped.

Niall C.
Damnit. So basically I'm screwed. :(
Billy ONeal
@Billy: Not so much screwed as facing the chore of setting up a project to build the CRT yourself.
Niall C.
@Niall C.: Yes, but I don't know which files are actually in the CRT. Which makes setting up a project difficult.
Billy ONeal