0

I've a C++ code from years ago which is supposed to be running correctly and I just face this error when I run it on my machine on Visual Studio 2019. I believe it was built on 2010 version. I searched how to install it, and tried safe ways but failed. any suggestion?

  • 3
    That's the debug library. It's not included in the redist package. So the "fix" is to build a release version of your application (and probably use a proper installer if you're not already, and judging by the error you're having, you're likely not). – WhozCraig Jun 23 '21 at 15:39
  • 1
    That file is only installed if you have Visual Studio 2010 installed. It's the debug CRT for Visual Studio 2010. You should not use this with any code you compile in VS2019 because the msvc compiler you use in VS 2019 is incompatible with VS2010. It's undefined behavior to use libraries from old versions of VS. Related: [https://learn.microsoft.com/en-us/cpp/porting/binary-compat-2015-2017?view=msvc-160](https://learn.microsoft.com/en-us/cpp/porting/binary-compat-2015-2017?view=msvc-160) – drescherjm Jun 23 '21 at 15:39
  • @drescherjm So if I want to run the code independently from anything related to msvc compiler of 2010 what changes I need to do? this is basic C++ and I don't think any libraries are dependent on the running system. it is a basic code which calls a dll library and I deal with its functions. –  Jun 23 '21 at 15:51
  • 1
    If you are just running the application and not developing it you need to use a Release build like @WhozCraig mentioned. There should be no debug dll dependency. If you are developing the software in Visual Studio the question is not easily answered without seeing the code. The reason is it may be easy to extremely difficult to port code from one version to another. – drescherjm Jun 23 '21 at 15:56

0 Answers0