Partager via


Linking to the CRT (Windows Embedded CE 6.0)

1/5/2010

The C Run-Time Libraries for Windows Embedded CE (CRT) provide many useful functions that can make programming much easier.

Prior to Windows Embedded CE 6.0, most CRT functions were provided by COREDLL.LIB, with a few being provided by CORELIBC.LIB.

As of Windows Embedded CE 6.0, all CRT functions are provided by CORELIBC.LIB. Because most applications already link to both CORELIBC.LIB and COREDLL.LIB, most users will not be affected by this change.

If you do not want to link to the CRT at all, you can exclude CORELIBC.LIB from the list of libraries passed to the linker. Note, however, that the compiler may reference certain CRT functions implicitly to implement language features such as Structured Exception Handling. This can cause linker errors, even if no CRT functions are referenced explicitly in your code.

When you link your image, you explicitly or implicitly specify an entry point that the operating system will call into after it loads the image. For more information, see CRT Entry Points.

Note that, in particular, the /GS - Enable Security Checks compiler option references the CRT. To use this option, you must use one of the CRT Entry Points to guarantee correct initialization.

See Also

Concepts

C Run-Time Library Overview
Run-time Library Behavior

Other Resources

WinMain
DllMain