Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Release mode still dependent on MSVCP110D.dll (C++ MSVS)

I am new to C++ programming and had just finished making a simple calculator. I decided to share it with my friends and after several attempts figured out how to compile it in release mode. However, even in release mode it is still dependent on the MSVCP110D.dll. I was wondering if there was a way to fix this?

like image 296
Chris Altig Avatar asked May 18 '13 05:05

Chris Altig


2 Answers

I am guessing your issue is with dependency on the debug version of the dll & not the dependency on the dll itself.

It's highly likely you doing one of these 2 things

  1. compiling with /DDEBUG or /D_DEBUG OR

  2. linking with msvcpd.lib

When you compile with /DDEBUG or /D_DEBUG, and #includeing one of the standard C++ headers, then msvcpd.lib is pulled in (with a #pragma(lib)which leads to a dependency on msvcpd***.dll.

msvcp(d)*.dll is the dll version of the standard C++ library.

If instead, your issue is with a dependency on any version the dll i.e. you want to staticly link with the C++ library, then you can compile your program with _STATIC_CPPLIB.

like image 116
user93353 Avatar answered Nov 09 '22 21:11

user93353


1) MSVCP110D.dll is the runtime .dll for the "Debug" version of the MS C Runtime Library. So it looks like your .exe might not have been built for "Release" correctly after all.

2) Here is information for the "Visual Studio Runtime Redistributable":

http://www.microsoft.com/en-us/download/details.aspx?id=30679

3) Here is more information on this particular problem:

http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvc/thread/e128dff6-cef5-4a81-b6de-fcbcaa7a23bb

Unfortunately the msvcp100D.dll is a debug dll and it isn't included in the Microsoft Visual C++ Redistrutable package. This is becouse normally debug version aren't release to other than developer. Developer have installed it by default with Visual Studio.

You can compile your project in "Release" so all dll which you'll need will be included in the Microsoft Visual C++ Redistrutable package.

Otherwise you can do the static link of all libraries(specify /MT in Release and /MTd in Debug configuration into compiler options): but personally I don't recommend it becouse you put in the executable many information(used by the debugger) which will slow down your app.

like image 25
paulsm4 Avatar answered Nov 09 '22 21:11

paulsm4