| description | Learn more about: Benefits and Tradeoffs of the Method Used to Link to the CRT | |
|---|---|---|
| title | Benefits and Tradeoffs of the Method Used to Link to the CRT | |
| ms.date | 05/06/2019 | |
| helpviewer_keywords |
|
|
| ms.assetid | 49b485f7-9487-49e4-b12a-0f710b620e2b |
Your project can link with the CRT either dynamically or statically. The table below outlines the benefits and tradeoffs involved in choosing which method to use.
| Method | Benefit | Tradeoff |
|---|---|---|
| Statically linking to the CRT (Runtime Library set to Single-threaded) |
The CRT DLL is not required on the system where the image will run. | About 25K of startup code is added to your image, substantially increasing its size. |
| Dynamically linking to the CRT (Runtime Library set to Multi-threaded) |
Your image does not require the CRT startup code, so it is much smaller. | The CRT DLL must be on the system running the image. |
The topic Linking to the CRT in Your ATL Project discusses how to select the manner in which to link to the CRT.
Programming with ATL and C Run-Time Code
DLLs and Visual C++ run-time library behavior
CRT Library Features