Skip to content

Latest commit

 

History

History
23 lines (18 loc) · 1.46 KB

benefits-and-tradeoffs-of-the-method-used-to-link-to-the-crt.md

File metadata and controls

23 lines (18 loc) · 1.46 KB
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
_ATL_MIN_CRT macro
ms.assetid 49b485f7-9487-49e4-b12a-0f710b620e2b

Benefits and Tradeoffs of the Method Used to Link to the CRT

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.

See also

Programming with ATL and C Run-Time Code
DLLs and Visual C++ run-time library behavior
CRT Library Features