다음을 통해 공유


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

Reference

C Run-Time Libraries

Concepts

Programming with ATL and C Run-Time Code

Run-Time Library Behavior