I was trying to use "using namespace System" in my U++ code.
It seems it has to be compiled with the Common Language Runtime Support (/clr).
How can I do that in U++? Or is it possible to do that in U++?
dolik.rce Messages: 1791 Registered: August 2008 Location: Czech Republic
Ultimate Contributor
chandlerZ wrote on Wed, 09 March 2011 03:43
Hello,
I was trying to use "using namespace System" in my U++ code.
It seems it has to be compiled with the Common Language Runtime Support (/clr).
How can I do that in U++? Or is it possible to do that in U++?
Chandler
Hi Chandler,
To add compiler options go to the project organizer and add "New compiler options..." from the context menu that pops up if you right-click in the right pane of the organizer window. Here you can fill in the /clr switch and optionally also witch flags should use it (leave the When field empty to use it everytime). You'll have to add it for all your packages that require the Common Language Runtime support.
Thank you for your reply. I tried to include /clr in the compiler option but I got the following error:
cl : Command line error D8016 : '/EHs' and '/clr' command-line options are incompatible
I realized that /clr does not support /EHs and the right command line option for it is /EHa. I was trying to include /EHa in the compiler option but it didn't solve the problem.
dolik.rce Messages: 1791 Registered: August 2008 Location: Czech Republic
Ultimate Contributor
A word of warning first: I am NOT a windows programmer and I have only vague and generic knowledge of MSVC
If I understood the documentation correctly the /EHs can be unset using /EHs-... The best hint I can give you is to try experiment a bit with the options, e.g. trying "/EHs- /EHa /clr" or something like that...
Maybe someone else will be able to give you better suggestion