C++ Compiler (cl.exe)

The following table shows some of the common usages of the C++ compiler:

Option

Description

/CLR or /COM+

This option flags the compiler to compile .NET-runtime managed code.

/entry:methodname

Normally, for C++ managed code, this setting should point to the main entry-point function.

/link

This option combines the compile and link steps.

/out:filename

This option allows for the output filename.

Get .Net Framework Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.