Visual Studio 2013 msvcr120 to msvcr100

37,524

Solution 1

You have a few choices:

  1. Install VS2010 on the machine, and set the Platform Toolset option to v100.
  2. Install the Windows SDK v7.0A from here, which SHOULD / CAN add a new option to your Platform Toolset menu in VS2013. Getting this to work can be quite fiddly though. (It's rarely worked for me right out of the box). Note if you use MFC in your application, this option isn't any good for you - MFC libraries are not included with this SDK.
  3. Get your users to install the Microsoft VS 2013 C++ Redistributable Package from here, and carry on regardless.
  4. Statically link to the VS2013 runtimes, instead of using dynamic linking to the runtime DLLs. You can set this in the IDE through project settings under C/C++ > Code Generation > RunTime Library > Multi-threaded (/MT) or (/MTd). All the needed code will be compiled into your app, which will make the files bigger, but will avoid the issues you mention.

Solution 2

In Project > Properties > General, there is a setting called Platform toolset. You can use that to change the version of the build toolchain used.

screenshot

Solution 3

One thing to consider in regards to changing the platform toolset: it changes the compiler, so C++ features newer than Visual Studio 2010 will not compile. It also requires the other version to be installed.

The best way to handle this would be to give them the Visual C++ Redistributable for Visual Studio 2013.

You could either have them do it themselves, or make an installer.

Share:
37,524

Related videos on Youtube

BennX
Author by

BennX

Updated on June 25, 2020

Comments

  • BennX
    BennX almost 4 years

    Is it possible to change the restrib file to msvcr100 so other computers can run the program without having problems with the .dll file? If so how do i get that?

    I do compile the program and other people can't use it because of the missing msvcr120.dll file. So it would be great if i could change that somehow.

    Is it possible to install the Plattformtoolset without a older Visualstudio version?

    • user1703401
      user1703401 over 10 years
      What do you hope to happen when that machine doesn't have msvcr100.dll installed either? It is merely somewhat likely that it is present, avoid depending on the kindness of other product's installer. And avoid assuming you actually need an installer to do it for you, just copy msvcr120.dll and friends into the same directory along with your own binaries.
  • Benoit
    Benoit over 10 years
    and it means that Visual Studio 2010 must also be installed on the machine.
  • BennX
    BennX over 10 years
    so i do actually need to install 2010 too to get the platform toolset right. or do i get it without the vs2010
  • BennX
    BennX over 10 years
    Solved it with 4) at first. Thanks alot!
  • Baldrick
    Baldrick over 10 years
    @lolando I accidentally munched your comment whilst trying to vote it up, sorry: in C/C++ > Code Generation > RunTime library, you have 4 choices: Static/Dynamic & Debug/Release. Static Release is /MT and Static Debug is /MTd
  • BennX
    BennX over 10 years
    Thanks alot. Maybe add that to the answer as well.
  • Baldrick
    Baldrick over 10 years
    Thanks for suggestion. Done!
  • crashmstr
    crashmstr over 10 years
    @JBentley true, but I think it is simpler to just install the required dlls. Do that once, and you are done for this or any other application built.
  • JBentley
    JBentley over 10 years
    One thing to be aware of with 4) is that any project dependencies must be linked the same way - the linker can't mix code which has been compiled with /MT and /MD. This can sometimes be frustrating when dealing with third party libraries.
  • JBentley
    JBentley over 10 years
    I'd say that depends on your project. If you aren't too reliant on external dependencies, then switching to static linking is merely a matter of changing a single setting in your project files - arguably a lot easier than changing your build process to include the redistributable (requiring your users to install this manually is poor design IMO).
  • JeffRSon
    JeffRSon almost 10 years
    Also, FWIW, it won't work with C++/CLI (/MT conflicts with /clr)