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
7
votes
1 answer

Dependency Walker Error: The Side-by-Side configuration information for "ABC.DLL" contains errors

I am running a program that I built in Visual Studio 2010 which uses a third party DLL "ABC.DLL". I am on Windows 7 64-bits. However, it fails to run due to one DLL. When running Dependency walker on this DLL, i get the following error: Error: The…
7
votes
5 answers

What's the scenario to use the atexit function?

CRT function atexit() could register a function to run after main function returns. I am wondering what's the typical scenario to use this? Is it (atexit) really necessary?
Thomson
  • 20,586
  • 28
  • 90
  • 134
7
votes
1 answer

Does msvcrt uses a different heap for allocations since (vs2012/2010/2013)

I've read about that some time ago but am unable to locate the change to the crt on msdn or anywhere else in the web. I think the msvcrt has been changed in the VC++ release of VS2012 in a way that it no longer uses the private heap for allocations…
Samuel
  • 6,126
  • 35
  • 70
7
votes
4 answers

Mixing versions of the MSVCRT

So, I have a C++ library with a statically linked copy of the MSVCRT. I want for anyone to be able to use my library with any version of the MSVC Runtime. What is the best way to accomplish this goal? I'm already being quite careful with how things…
Earlz
  • 62,085
  • 98
  • 303
  • 499
7
votes
1 answer

Using msvcrt.getch() in Eclipse / PyDev

I wanted to use msvcrt.getch() in Eclipse with PyDev to read a signe char but I found out that it just don't work (but It works in the Windows console). Any idea what to do ?
Matthieu Riegler
  • 31,918
  • 20
  • 95
  • 134
7
votes
2 answers

FreeConsole behaviour on Windows 8

On Windows 8, we have an issue with FreeConsole. It seems to close the stdio handles, without shutting the file streams. This may be a Windows 8 problem, or it could be that I simply don't understand the (totally absurd) way the Windows console/GUI…
Nicholas Wilson
  • 9,435
  • 1
  • 41
  • 80
6
votes
4 answers

How can I resolve this link error in Visual Studio (LNK2005)?

I keep having linker errors of the following form: libcmtd.dll msvmrtd.dll some element(ex: _mkdir ) already defined... and I don't know how to resolve them. Here is a complete error message: private: __thiscall type_info::type_info(class…
Cute
  • 13,643
  • 36
  • 96
  • 112
6
votes
1 answer

Writing a DLL that loads msvcr80.dll and exposes the free()-function

I have a third-party DLL that depends on MSVCR80 and allocates resources that I need to cleanup. The library does not expose a free-function for doing this. Instead, I need to load the same runtime library and manually call the free function. As a…
larsmoa
  • 12,604
  • 8
  • 62
  • 85
6
votes
1 answer

usage of MSYS2 environments

I want to thoroughly understand the usage of environments from the MSYS2 platform. A partial description is available at: https://www.msys2.org/docs/environments/ Things I understand: MSYS environment it is used to build applications that will run…
user16533250
6
votes
0 answers

No module named 'msvcrt'

I am stuck in here (picture below) and need to pass this in order for it to read my text. Also I have text.txt file. The program itself won't run with python 2. With python 2 it gives me an error in here: print(last_suggestion, end=' ',…
Person
  • 61
  • 1
  • 4
6
votes
2 answers

Assertion error in CRT calling _osfile() in VS 2008?

I have a C++ code base that has been working for a long time. The code base was a legacy VS 2003 set of projects that I recently migrated to VS 2008. The migration seemed to be successful in that the resulting program built, and run. I reinstalled…
Dan Nissenbaum
  • 13,558
  • 21
  • 105
  • 181
6
votes
1 answer

Why does the MSVC _count_of implementation add 0 to the result of sizeof?

I've been reading the implementation of the _countof macro in MSVC and found a detail I can't explain. It's implemented via a __crt_countof macro which on C++ is expanded to (sizeof(*__countof_helper(_Array)) + 0) (here's the relevant code from the…
Kirill Dmitrenko
  • 3,474
  • 23
  • 31
6
votes
1 answer

Unresolved symbol `__imp__iob`, not `__imp___iob`

I'm compiling a program with Visual Studio 2017 that links with the precompiled static version of libusb, available here. When I tried to link it I got some unresolved symbols like these and the answers pointed me to legacy_stdio_definitions.lib…
Timmmm
  • 88,195
  • 71
  • 364
  • 509
6
votes
0 answers

What memory management algorithms are well-regarded and used by major compiler vendors?

As an exercise I am writing a memory manager - that is, the code which implements malloc, realloc and free (or new and delete.) The RTL for my language, Delphi, allows the RTL's memory manager to be replaced easily. For those of you using C++,…
David
  • 13,360
  • 7
  • 66
  • 130
6
votes
3 answers

vs2012 toolset compatibility

In my VS2012 I have 4 toolsets available: v90, v100, v110 and v110_xp. I did a simple test with two projects testlib (a static library) and testexe (console application). The interface was just one function with signature void test(). The…
Tomasz Grobelny
  • 2,666
  • 3
  • 33
  • 43