Please consider that this intrusive sentence could instead be proclaiming that you help sponsor this research.

Home > Programming > Tools > Visual C++ > Compiler > Options

CL /clr

Syntax

positive:

/clr[:noAssembly]

negative:

/clr-

This option is ordinarily case-insensitive. When sought as an early option, it must be entirely in one case, either lower or upper.

Relations

The positive and negative forms override each other, of course. Additionally, the /clr option (with or without the noAssembly keyword)

and the /clr:noAssembly option

Behaviour

A side-effect of /clr is to change the so-called logo, so that the compiler styles itself as

Microsoft (R) C/C++ Optimizing Compiler Version 13.00.9466 for .NET Framework

Note that this change depends on /clr being found as an early option, which involves some relaxation of syntax.

Added Options

If the ordinary processing of command-line options leaves /clr in effect, with or without the noAssembly keyword, then CL adds the -Gil option for the front-end and back-end compilers and implies -D_MANAGED. Since this definition of the _MANAGED macro occurs after the imposition of syntactical relations, it is not undone by the /U or /u options.

If none of the /LD, /LDd, /MD, /MDd, /ML, /MLd, /MT or /MTd options are set, then where CL would ordinarily impose /ML, an active /clr (again, with or without the noAssembly keyword) causes CL to add /MT instead. The implied definition of the _MT macro is again too late to be undone by /U or /u.

This page was created on 27th October 2005. The last significant modification was on 9th March 2006.

Copyright © 2005-2006. Geoff Chappell. All rights reserved.

Please consider that this intrusive sentence could instead be proclaiming that you help sponsor this research.

Home > Programming > Tools > Visual C++ > Compiler > Options

[Home][Programming Samples][Application Notes][Security Notes][Editorial][Consultation][Contacts]