Troubleshooting
Problem
When overriding TargetRTS methods in the model and the TargetRTS is built Flat, link errors similar to the following will occur. !> Linking T221_flat C:/Progra~1/Rational/RoseRe~1/C++/TargetRTS/lib/TORNADO22T.simnt-gnu-2.96Flat/libObjecTime.a(RTMain.o)(.text+0xa5c):fake: multiple definition of 'RTMain::targetShutdown(void)' Override.o:C:\RoseRTCases\C++\OverrideRTSMethodEx\T221_flat\build/C:\RoseRTCases\C++\OverrideRTSMethodEx\T221_flat\src\Override.cpp:12: first defined here
Cause
When the TargetRTS is built flat, there is one object file per TargetRTS class. The linker first links the object files in the model and then tries to link the TargetRTS libraries. This is when the error occurs.
Resolving The Problem
Rebuild the TargetRTS libraries in non-Flat mode. This will create one object file per TargetRTS method. The linker will now first link the object files in the model and then link the TargetRTS libraries which were archived with one object file per method. When the linker sees the method is already defined in the model, it won't be linked in from the TargetRTS libraries.
For more information on overriding TargetRTS methods in your model, see the online help:
C++ Reference --> Configuring and Customizing the Services Library --> Configuration and Customization --> Overriding Operations Within a Model
Related Information
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21176466