I try to transfer the compiled application to another computer, it requires the msvcr100.dll library, why? After all, I use WINAPI. How to make your project without this library?
Well, you can attach this library to the program statically and it will not be required.
It is done this way: in the properties of the project, go to the point C / C ++, and then to Code Generation. There is a property Runtime Library. Choose one where there is no DLL inscription. Debug (Debug) or not version - it depends on the configuration of the project.
It is possible to use a completely different standard library, but it is more difficult and less convenient =)
First, you can copy the library to the same place where the executable file is located. Secondly, compile the project not in the debug version (Debug), but in the final version (Release), it does not require libraries, since The library code is included in other project files (although I don’t remember their extensions).
And finally, you can opt out of the standard library option, a screenshot of which resulted above. There is a “no library” option.
If after that there will be linking errors - do not judge, then you still use it!
Msvcr * .dll is the libraries supplied with the C ++ compiler. They contain, for example, memory allocation / release functions that run on top of WinAPI. Those. let's say, the WinAPI function is used to allocate pages of virtual memory to the process, and on the received pages, the malloc / free functions from msvcr create a heap and extract small pieces from it.
Static linking is, of course, good, but sometimes creates other problems. For example, if the exe and the dll it uses are both linked to msvcr statically, you cannot allocate a piece of memory in exe and release it in the dll. To do without static linking, you must install the Microsoft Visual C ++ 2010 Redistributable Package. For example, http://www.microsoft.com/en-us/download/details.aspx?id=5555