Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic Rhapsody (steve huntington)
Decrease font size
Increase font size
Topic Title: How to compile .NET managed code with Rhapsody?
Topic Summary:
Created On: 5-May-2006 11:03
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 5-May-2006 11:03
User is offline View Users Profile Print this message


Simon Morrish

Posts: 127
Joined: 17-May-2005

Hi everyone!

I'd like to use Rhapsody in C++ to compile .NET managed code to execute over the Common Language Runtime (CLR), using Microsoft Visual Studio 2003 or 2005.

I've not yet tried this myself, but I expect there to be issues with compiling generated code, and more so with compiling the framework libraries, so I thought I'd check if anyone has tried this before.

Is there anyone out there who could give me any advice on this, or even better show me how to do it with an example? :rolleyes:

yours hopefully,
Simon

-------------------------
Simon Morrish
simon.morrish@eu.panasonic.com
http://panasonic.co.uk
Panasonic ideas for life
Report this to a Moderator Report this to a Moderator
 28-May-2006 23:44
User is offline View Users Profile Print this message


Franklin Bidwell

Posts: 4
Joined: 16-Aug-2005

Hi Simon,

I'm also interested in using Rhapsody to generate code that can be compiled in the CLR environment.

I've been able to compile all the OXF libraries with the /CLR option but the animation libraries give me a link error when I try to use them.

I've managed to get a simple helloworld program to generate and compile and I was able to serialize a class generated from Rhapsody using the XMLSerializer .NET class. I used the Specification_Prolog property to make the class a ref class.

Have you gotten any responses from anyone else? Have you made any progress yourself?


I've attached a small project I made that did a XML serialize of a small class. Its not much, but its my humble start. I asked the iLogix folks about this, but it seems that after the Telelogic merger they aren't interested in expanding Rhapsody in this direction, but want to concentrate on the embedded market.

I'd appreciate any information that you have gathered.

Frank Bidwell
Software Engineer Staff
Lockheed Martin Aeronautics Company
[email]franklin.h.bidwell@lmco.com[/email]
Report this to a Moderator Report this to a Moderator
 1-Jun-2006 08:49
User is offline View Users Profile Print this message


Simon Morrish

Posts: 127
Joined: 17-May-2005

Hi Frank

Thanks for your reply. I've tried generating and compiling your example using Rhapsody 6.1MR2 and Visual Studio .NET 2003, but I get a lot of compilation errors. I guess my environment must differ from yours in some way...

Would you mind sending me your generated code (ie. the DefaultComponent\DefaultConfig folder) so I can see how it should work and track down why my generated code doesn't?

On the question of I-Logix's support, I got the following response:
[INDENT]
Hi Simon,

Here is Developments response regarding Rhapsody's compatibility with .NET CLR:

The framework is not CLR ? however CLR applications may use the framework as a native library.

In 2003 using Rhapsody is possible primarily using the prolog/epilog properties (for example setting a class SpecificationProlog to ?__gc?) this can be done using stereotypes to make it easier to use.

2005 is a different story as it requires an addition to the C++ syntax that cannot be done yet by Rhapsody (I?m not aware of any plans to support it, however the additions are going to be part of the next C++ standard so at some point we?ll need to support them).

Best Regards, Erin Dyer
[/INDENT]

Erin was very helpful, as ever. However, reading between the lines, I think the situation is as you state; Rhapsody will not be targetted at this market.

That doesn't mean it can't be made to work though!

best regards,
Simon

-------------------------
Simon Morrish
simon.morrish@eu.panasonic.com
http://panasonic.co.uk
Panasonic ideas for life
Report this to a Moderator Report this to a Moderator
 1-Jun-2006 13:26
User is offline View Users Profile Print this message


Franklin Bidwell

Posts: 4
Joined: 16-Aug-2005

Hi Simon,

I made the project using Rhapsody 6.2 and Visual Studio Pro 2005. I think the problem is the new 2005 C++ syntax that I included in the code, this won't work with the 2003 compiler.

I wonder what Syntax addition in 2005 that Erin thinks won't work? I'd like to know what gotcha I might run into down the road.

I was able to get some stuff to work by experimenting with either using the properties he suggests, SpecificationProlog, or setting the Implementation property in a Relation or Attribute to User and then messing with the OMContainers->User property.

In addition, I did as Erin suggested, I compiled the OXF and Animation libraries without the /CLR option. .NET application can use these fine since .NET handles the Native->Managed Transition for you. I still have problems using the Animation Libraries, but I haven't tried to figure out a solution to them yet.

Anyway. I am attaching the code I generated from Rhapsody.
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic Rhapsody forum.
There are currently 1 users logged in.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.