Feature #156

Add clr support

Added by Miroslav Fidler about 9 years ago. Updated about 9 years ago.

Status:ApprovedStart date:11/06/2011
Priority:HighDue date:
Assignee:Miroslav Fidler% Done:

100%

Category:IDESpent time:-
Target version:-

Description

Using 'CLR' flag (which would in turn activate 'USEMALLOC').

The only problem seems to be exception handling, but MS says /clr can handle C++ exception

http://msdn.microsoft.com/en-us/library/633chdda%28v=vs.80%29.aspx

so in the end, it is mostly about testing..

Optional: Add syntax highlighting for Managed C++.

uppsrc_part1.diff Magnifier - The diff file to apply for uppsrc directory (first part) (1.18 KB) Sender Ghost, 11/06/2011 10:54 AM

uppsrc_part2.diff Magnifier - The diff file to apply for uppsrc directory (second part) (959 Bytes) Sender Ghost, 11/06/2011 12:19 PM

uppsrc_part3.diff Magnifier - The diff file to apply for uppsrc directory (third part) (856 Bytes) Sender Ghost, 11/06/2011 03:08 PM

History

#1 Updated by Miroslav Fidler about 9 years ago

  • Priority changed from Normal to High

#2 Updated by Sender Ghost about 9 years ago

The only problem seems to be exception handling, but MS says /clr can handle C++ exception
Yes, it is possible to use -EHa (enable C++ EH (w/ SEH exceptions)) compiler option.

The question:
Where to add -clr compiler option?
After adding it for C++ extension files, not all U++ packages compiles.
Also, -clr has sub-options, such as pure, safe, oldSyntax, initialAppDomain, noAssemlbly. Therefore, I think, this is package related only, configured by developer.

#3 Updated by Sender Ghost about 9 years ago

  • File uppsrc_part1.diffMagnifier added
  • Category set to IDE
  • Status changed from New to In Progress
  • % Done changed from 0 to 50

Ok, here is first part of the patch for using CLR build option.
Tested for console and GUI U++ applications combined with managed C++ source code (invoking MessageBox::Show from System.Windows.Forms.dll along with PromptOK, for the GUI).

#4 Updated by Sender Ghost about 9 years ago

  • File uppsrc_part2.diffMagnifier added
  • Status changed from In Progress to Patch ready
  • Assignee set to Miroslav Fidler
  • % Done changed from 50 to 100

Here is second part of the patch related for syntax highlighting.
Not sure about for each statement.

#5 Updated by Miroslav Fidler about 9 years ago

  • Status changed from Patch ready to Ready for QA
  • Assignee changed from Miroslav Fidler to Sender Ghost

Applied, but I moved USEMALLOC thing from builder to Core - please check.

#6 Updated by Sender Ghost about 9 years ago

  • Status changed from Ready for QA to Approved
  • Assignee changed from Sender Ghost to Miroslav Fidler

It works. Thanks.

Other thing is default SSE2 build flag for new packages, which incompatible for -clr compiler option:

cl : Command line error D8016 : '/arch:SSE2' and '/clr' command-line options are incompatible

Fortunately, it can be disabled.

#7 Updated by Sender Ghost about 9 years ago

Or fix it like this.

#8 Updated by Sender Ghost about 9 years ago

But maybe this is fixed for newer MSC versions like Visual Studio 2010.
It was related for MSC9.

#9 Updated by Miroslav Fidler about 9 years ago

  • Status changed from Patch ready to Approved

Also available in: Atom PDF