Re: settting /CLR per file in VS 2005

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



bonk wrote:
> I was told that it is possible to set the /clr compiler switch on a
> per file basis. I find this option in the project settings for the
> .cpp files. However that does not affect the header files. So if I
> have a class that has managed members setting the /clr on a per file
> basis does not work. ( for example it will tcomplain about using the
> ^ requires the /clr switch)

Naturally.

If you have a class that has managed membrers, then every file that sees
(uses, instantiates, touches, whatever) that class must be compiled as
managed code and will need to be compiled with /clr.

Bottom line: you need to design and manage the boundary between your
managed and unmanaged code carefully in order to really keep the two
separate.

-cd


.



Relevant Pages

  • Re: Uninitialized variables
    ... > In a discussion on whether or not to allow a compiler switch to set ... > unintialized variables to zero on the old CVF forum, ... > eems reals and integers have a default initialization of the largest ...
    (comp.lang.fortran)
  • Re: porting from solaris/sparc to linux/intel
    ... The usual and standard way to specify double precision is to write it ... question that you are probably using a compiler switch on the Sun to ... But if you do want to use a compiler switch ... That probably forces you to choose between fixing ...
    (comp.lang.fortran)
  • Re: first time using direct access files: recl ??
    ... > linux expects this number in bytes and the unix are expecting in words ... I think this is compiler dependent more than it is OS dependent. ... employ the appropriate compiler switch to force this behaviour (e.g. on the SGI it is ...
    (comp.lang.fortran)
  • Re: is there a "process affinity" switch
    ... > Please forgive my ignorance on this issue. ... Hyperthread screws up my text writes). ... > was no switch in the compiler that would essentially do ... compiler switch. ...
    (microsoft.public.vb.general.discussion)