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: Entry Point for executable - main()
Topic Summary:
Created On: 15-May-2006 17:46
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.
 15-May-2006 17:46
User is offline View Users Profile Print this message


Shawn Adams

Posts: 3
Joined: 15-May-2006

I'm using Rhapsody in C to model some software with several executables. I want to write my own main() function for each executable. I want each main() to be located inside a file I've created in the model. However, Rhapsody is creating its own MainComponent file with a main() in it. How do I stop Rhapsody from generating this file and tell it to use the main() I've created?

thanks,
shawn
Report this to a Moderator Report this to a Moderator
 19-May-2006 12:37
User is offline View Users Profile Print this message


Simon Morrish

Posts: 127
Joined: 17-May-2005

Hi Shawn

Rhapsody expects to generate its own "main()" for each component you specify as an Executable. If you can, I would suggest going with the flow and putting your main() into the MainComponent.c file that Rhapsody generates.

You can do this by entering your code into the Initialization tab of the Configuration features dialog box. If you want to leave out Rhapsody's auto-generated OXF-startup code, set the CG::Configuration::MainGenerationScheme property to "UserInitializationOnly".

You might also find the following properties useful for customising the content of MainComponent.c:

C_CG::Configuration::ImplementationProlog
C_CG::Configuration::ImplementationEpilog
C_CG::Configuration::MainFunctionArgList
C_CG::<Env>::EntryPoint
C_CG::<Env>::EntryPointDeclarationModifier

If the last property does not exist in your environment, you can try adding it to your SiteC.prp properties file.

In addition, if you really must put your main into a different file, the EntryPoint property might be your way to achieve this.

Hope that helps...

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
 30-May-2006 17:37
User is offline View Users Profile Print this message


Shawn Adams

Posts: 3
Joined: 15-May-2006

Thanks Simon, your reply was very helpful
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.