To perform a build in Eclipse, Rational Rose RealTime must be installed on the computer that runs Eclipse, but it does not have to be running. Rational Rose RealTime must be installed because Eclipse must have access to the libraries and header files in Rational Rose RealTime. The build process requires access to the Rational Rose RealTime Runtime system because it must be able to compile for all of the targets.
Note: In Rational Rose RealTime, you must modify the value for the TargetServicesLibrary on the C++ Compilation tab (C Compilation tab for the C Language) for a component if you generate code on one computer and build it on another, and the computers are on different configurations. For example, if you generate a Rational Rose RealTime model on a Windows computer, and attempt to build it on a computer with a Linux configuration, the build will not be successful. To successfully build when doing cross-platform development, open the Component Specification dialog and click the C++ compilation tab. Typically, the value for TargetServicesLibrary is $ROSERT_HOME/C++/TargetRTS. The code generator will generate a make file and expand the $ROSERT_HOME environment variable to the actual value (for example, C:\Program Files\Rational\Rose Realtime). This value may not be valid on the computer doing the build. You must modify the environment variable so that it is not expanded by inserting round brackets around the environment variable name. For example, $(ROSERT_HOME)/C++/TargetRTS.
To use the Build Project option in Eclipse, you must first clear the generated files from the existing project.
To build clean code in Eclipse:
Eclipse generates a clean set of project files for the selected Rational Rose RealTime component.
Note: When Eclipse creates a C++ project from building a Rational Rose RealTime component, Eclipse changes to the C/C++ Development perspective, and it changes the make build command to use the generated code and the generated makefile (makefile.eric). Now, when you perform a build in Eclipse, the build uses the make file makefile.eric.
Now, you are ready to build in Eclipse.
Compilation starts, using the special makefile Makefile.eric. While the code compiles, you can view the output in the C-Build output window. If there are any compilation errors or warnings, they appear in the Tasks list.
Note: If there are build errors in Eclipse caused by syntax errors in your code (the code between the //{{{USR and // }}}USR tags), you can easily navigate to that corresponding element in Rational Rose RealTime.