Does anyone know how to change the default behavior of the /clr switch to make all files unmanaged by default? The default behavior of the switch is to make all files managed. I know I can mark each .cpp file individually, but there are ALOT of them...
+2
A:
I ended up leaving the switch OFF in the project properties and then tried turning it on only for those .cpp files that needed it, this worked once I fixed the incompatible options like /RTC1 and /Gm, etc.
John JJ Curtis
2009-06-11 03:27:43
Yes, this won't work because the project file needs to know that /clr is enabled for any clr magic to happen.
OJ
2009-06-11 03:31:33
Err yes actually this technique works just fine. You can turn /clr on a single file and the result will be a (mostly unmanaged) .net assembly
1800 INFORMATION
2009-06-11 03:41:08
A:
From what I can see, no there is no way of, by default, setting each .cpp file to native inside of VS or on the command line. You'll have to do it manually in the IDE (or script something that modifies the proj file).
OJ
2009-06-11 03:31:11