IBM Support

Building Rational Rhapsody project results in error "C2385: ambiguous access of 'setActiveContext'"

Troubleshooting


Problem

Attempt to realize an interface and inheriting a class with triggered operation result in error “C2385: ambiguous access of ‘setActiveContext’" while building IBM Rational Rhapsody project.

Symptom

The full error message is as follows:

Create a sample Rational Rhapsody project with an Interface say Interface_1 and two classes say Base_Class and Derived_Class.

  1. Create a triggered operation say Trigger() in Base_class.

  2. Realize Interface_1 and inherit Base_class in the Derived_Class.

  3. Create a statechart for Derived_Class with State_1 and State_2. Call Trigger() to transit from State_1 to State_2.

  4. Save and build the Rational Rhapsody project. Verify the error


Cause

Rational Rhapsody is getting confused as to which OMReactive to use, as both interface and base class includes OMReactive.

Resolving The Problem

SOLUTION:

  1. Navigate to the Interface_1 Feature.

  2. Uncheck the property, CPP_CG::Framework::ReactiveBaseUsage.

  3. Verify if Rational Rhapsody project is build successfully.

NOTE: The ReactiveBaseUsage property specifies whether to use the class specified by the ReactiveBase property as the base class for all reactive objects. By Default it is checked

[{"Product":{"code":"SSB2MU","label":"IBM Engineering Systems Design Rhapsody"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"General Information","Platform":[{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"7.6.1;7.6.1.1;7.6.1.2;7.6.1.3;7.6.1.4;8.0;8.0.1;8.0.2;8.0.3;8.0.4;8.0.5","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Product Synonym

Rational Rhapsody

Document Information

Modified date:
27 May 2022

UID

swg21663926