IBM Support

Building DDS MySubscribingApplication in IBM Rational Rhapsody results in error C2065 MyTopicStructDataReader: undeclared Identifier

Troubleshooting


Problem

Building DDS MySubscribingApplication in IBM Rational Rhapsody results in error C2065 MyTopicStructDataReader: undeclared Identifier

Symptom

Building ------------ MySubscribingApplication.exe ------------
Executing: ""C:\Rhapsody8.0.2\Share"\etc\msvcmake.bat MySubscribingApplication.mak rebuild x86 VC10 "
Setting environment for using Microsoft Visual Studio 2010 x86 tools.
Cleanup
MySubscriber.cpp
MyDataReaderListener.cpp
MyDataReaderListener.cpp(24) : error C2065: 'MyTopicStructDataReader' : undeclared identifier

MyDataReaderListener.cpp(24) : error C2065: 'myTopicStructDataReader' : undeclared identifier

MyDataReaderListener.cpp(24) : error C2061: syntax error : identifier 'MyTopicStructDataReader'

Cause

This is caused by the code that is pasted into MyDataReaderListener::on_data_available operation, as directed by the DDS Tutorial: Lesson 12.

Resolving The Problem

The identifier in the error exists (MySubscriber::MyDataReader is an instance of MyTopStructDataReader).
Therefore, you must add a usage dependency from MyDataReaderListener to MySubscriber.

[{"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":"8.0;8.0.1;8.0.2;8.0.3;8.0.4;8.0.5;8.0.6;8.1;8.1.1;8.1.2;8.1.2.1;8.1.3;8.1.4;8.1.5;8.2","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Product Synonym

DDS;compile;error;C2065;undeclared identifier;Rational Rhapsody

Document Information

Modified date:
27 May 2022

UID

swg22002004