简体   繁体   中英

Lowering a Visual C++ 2010 framework target

I've browsed around StackOverflow but couldn't find any pratical solution to something that would seem to have such an easy solution: I had a bunch of .Net projects that were developed back in VS2005 or VS2008 and I imported them into VS2010. One of them is a C++ project, which currently targets framework 4.0 (not by my choice). One of our clients is having a problem running this application, the lack of a MSVCP100D.dll. I checked this thread what is MSVCP100D.dll? and the most accepted answer is simple: having the client install Microsoft Visual C++ 2010 Redistributable Package. However, the client is stubborn enough not to install it and I know for a fact that they have Microsoft Visual C++ 2008 Redistributable installed. So, if I'm correct in my conclusions and MSVCP100D.dll is new to VS2010, I could just target a previous framework version, rebuild the project in VS2010 and I'd be good to go. The problem is: how do I chance a VC++ target framework? I could find several guidelines to change C# and VB projects, but none about VC++. Any pointers?

Edit: To you guys who suggested that I compile it in Release mode: I am! It's been pointed out that the "D" stands for debug, which is rather strange.

Actually, you are using the debug version of the runtime (That's the "D"). Did you try compiling with a non-debug version?

Another possibility to consider would be to statically link with the runtime library. Your program will be larger, but will not have the DLL dependency.

Go into the project's properties.

On the lefthand side, go into Configuration Properties > General .

Look at the Platform Toolset value. Select v90 from the drop down list to target 2008.

See here for further details: Visual C++ 2010 compatibility with VC 2008

See here for yet even more details: http://blogs.msdn.com/b/vcblog/archive/2009/12/08/c-native-multi-targeting.aspx

在此输入图像描述

Also as Dark Falcon mentions, that's the debug version of the runtime.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM