I've built an application that makes use of C++11 features and the winsocket. I built the application using windows 10 and the Visual C++ 2015 compiler. On the Win10 machine it runs fine. On a Win7 machine a popup shows up, stating that the file ucrtbase.dll is missing.
I've done a little research on the web and found out that Microsoft did quite a big change to the CRT and thus renamed some dlls. These dlls are not available per se on Win7.
Is there a way to build my application independant from this libraries? I'd like to ship the application to both Win7 and Win10 users.
Thank you
As the comment on your question says, you can statically link the CRT by using the /MT flag in project's Configuration Properties -> C/C++ -> Code Generation -> Runtime Library
setting.
If this is not an option for your project, you can install the CRT redistributables instead.
In C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\redist\1033
you will find three files:
vcredist_arm.exe
vcredist_x64.exe
vcredist_x86.exe
These are packages containing the CRT for this version of Visual Studio, designed to be installed on machines that need to run your software.
Install the appropriate redistributable on the target system prior to running your application. For example, if your application is 32bit, install vcredist_x86.exe
. For 64bit, install vcredist_x64.exe
.
Generally when you create an installer for your software you bundle these files too, and run them during the install process.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With