views:

244

answers:

2

How can I compile using Visual C++ 2008 and link against an older version of the C runtime (I want version 7 instead of 9)?

+2  A: 

I think what you have to do is find the Linker -> Input property page for your project and tell it to specifically ignore msvcrtd.dll / msvcrt.dll and then explicitly link to the version you want (full path). Not sure what will happen if they have the same name...

jeffamaphone
+1  A: 

I think Microsoft specifically says "don't do this." The thing is, msvcrt.dll is now considered to be part of the OS, not part of any particular app, and not a redistributable. MS may update it with a Service Pack, and may change behavior significantly, as they did with XP SP2. Which would break apps! So... Don't Do It.

Cheeso
if you build ur application using vs2008 it will rely on msvcr09.dll which exists in winsxs folder not in the windows\system32 folder
Ahmed Said