![]() |
Telelogic Rhapsody (steve huntington) | ![]() |
Topic Title: Entry Point for executable - main() Topic Summary: Created On: 15-May-2006 17:46 Status: Read Only |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
Thanks Simon, your reply was very helpful
|
|
![]() |
Telelogic Rhapsody
» Rhapsody Category » Rhapsody
»
Entry Point for executable - main()
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.