Questions tagged [msvcrt]

MSVCRT is the Microsoft Visual C++ Runtime.

MSVCRT is the Microsoft Visual C++ Runtime. It is included in Microsoft Visual C++ Redistributable Package.

KB 2977003 lists supported Visual C++ runtime downloads from Visual C++ 2005 to 2015.

Visit C Run-Time Library Reference on MSDN to get more information.

483 questions
287
votes
6 answers

Resolving LNK4098: defaultlib 'MSVCRT' conflicts with

This warning: LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library is a fairly common warning in Visual Studio. I'd like to understand the exact reason for it and the right way (if at all) to…
shoosh
  • 76,898
  • 55
  • 205
  • 325
152
votes
7 answers

Should I compile with /MD or /MT?

In Visual Studio, there's the compile flags /MD and /MT which let you choose which kind of C runtime library you want. I understand the difference in implementation, but I'm still not sure which one to use. What are the pros/cons? One advantage to…
andy
  • 18,005
  • 9
  • 30
  • 27
62
votes
1 answer

What is the cause of "This application has requested the Runtime to terminate it in an unusual way"?

There's a common error that gets thrown by the Visual C Runtime: This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. What does this error message…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
48
votes
2 answers

Why does my application require Visual C++ Redistributable package

I'm writing a simple C++ application in Visual Studio. It also has a setup project. It works well on my development machine, but when I'm installing this application on user's machine it requires Visual C++ Redistributable Package. I'm wondering why…
JeB
  • 11,653
  • 10
  • 58
  • 87
46
votes
6 answers

How to make vcredist_x86 reinstall only if not yet installed?

In my inno setup RUN selection I force silent install of MSVCRT. I wonder how to make it install itself only if not yet installed? This is what I call now: Filename: {tmp}\vcredist_x86.exe; Parameters: "/passive /Q:a /c:""msiexec /qb /i…
myWallJSON
  • 9,110
  • 22
  • 78
  • 149
38
votes
3 answers

How do I get the file HANDLE from the fopen FILE structure?

The fopen function returns a pointer to a FILE structure, which should be considered an opaque value, without dealing with its content or meaning. On Windows, the C runtime is a wrapper of the Windows API, and the fopen function relies on the…
lornova
  • 6,667
  • 9
  • 47
  • 74
38
votes
6 answers

Visual C++ executable and missing MSVCR100d.dll

I know this has been asked in other places and answered, but I'm having issues with MS Visual Studio 2010. I've developed a C++ executable but if I run the Release version on a machine that doesn't have the VC++ runtime library (ie, msvcr100d.dll),…
mgiuffrida
  • 3,299
  • 1
  • 26
  • 27
35
votes
6 answers

Visual studio 2015 run-time dependencies or how to get rid of Universal CRT?

Compiled couple of .dll's using visual studio 2015, and tried to deploy on some older windows 7 / 64 bit. Tried also to guess which dll's are needed for application to start and copied MSVCP140.DLL & VCRUNTIME140.DLL - but application could not load…
TarmoPikaro
  • 4,723
  • 2
  • 50
  • 62
34
votes
4 answers

Should I redistribute msvcrt.dll with my application?

Should I redistribute msvcrt.dll with my application and use the private dll if some of the application's libs dynamically depend on msvcrt.dll? I.e. are any incompatibility issues possible with the system's msvcrt.dll (dll hell)? Application is…
kr
31
votes
4 answers

Is MSVCRT under Windows like glibc (libc) under *nix?

I frequently come across Windows programs that bundle in MSVCRT (or their more current equivalents) with the program executables. On a typical PC, I would find many copies of the same .DLL's. My understanding is that MSVCRT is the C runtime…
Toybuilder
  • 11,153
  • 5
  • 28
  • 33
24
votes
4 answers

Windows malloc replacement (e.g., tcmalloc) and dynamic crt linking

A C++ program that uses several DLLs and QT should be equipped with a malloc replacement (like tcmalloc) for performance problems that can be verified to be caused by Windows malloc. With linux, there is no problem, but with windows, there are…
Weidenrinde
  • 2,152
  • 1
  • 20
  • 21
24
votes
2 answers

How can fopen_s be more safe than fopen?

I'm working on legacy code for Windows platform. When I compile the code in VS2013, it give following warning: error C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use…
ZijingWu
  • 3,350
  • 3
  • 25
  • 40
23
votes
4 answers

Should I link to the Visual Studio C runtime statically or dynamically?

I have read arguments on both sides about whether one should link to the C runtime library statically or dynamically in Visual Studio projects, and I'm still not entirely sure what to think. My project pulls in some third-party libraries (Python,…
user76293
  • 559
  • 2
  • 5
  • 14
22
votes
2 answers

What is security cookie in C++?

I have read from Google that it is used for controlling buffer overruns at application level and it is called by CRT. It also says that " Essentially, on entry to an overrun-protected function, the cookie is put on the stack, and on exit, the value…
Bhupesh Pant
  • 4,053
  • 5
  • 45
  • 70
20
votes
1 answer

Differences between msvcrt, ucrt and vcruntime libraries

Can someone please explain the difference between these? Internet lookup has confused me. I am using VS2019.
fonishormon
  • 351
  • 1
  • 2
  • 8
1
2 3
32 33