I’m working on a cpp app, works fine on the virtual machine im developing but in my laptop (XP without c++ redistributable package) it shows an error saying the app needs MSVCR100.DLL and it’s not in the computer. I am not referencing the dll directly anywhere in the app so I guess it could be because of the headers included. I don’t want to use this dll include, I’d prefer if the app works without it. These are the headers included:
#include <winsock2.h>
#include <windows.h>
#include <process.h>
#include <shellapi.h>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
I tried commenting a few, but for commenting other I have to change too much code just for testing.
Which one of those headers comes from MSVCR100.DLL?
The project setting “Runtime library” is set to Multi-threaded (/MT).
Everything in the C library depends on it whenever you compile your program with Visual Studio 2010. So either you link statically with the C runtime, or you deploy the DLL with your application.
If you want to know, stdlib.h, stdio.h, cmath.h depend on it, and also probably a lot of headers depending on the C runtime are indirectly included in all your other headers. So I’d say all of your headers depend on MSVCR100.DLL.
Another solution is to have a Visual Studio 2008 + SP1 installed alongside 2010 (VC++ express 2008 works fine) and select “Toolset v90” in the project properties.