Integrating IBM Rhapsody models into VS 2019

683 Views Asked by At

I am here for help in one of my tasks to integrate IBM Rhapsody models into VS 2019 C++ project.Here is what we are trying to do. Please note: I am not an expert in IBM Rhapsody Systems Engg tool. My expertise is WPF and .net application We have generated Rhapsody model for an automatic car dashboard using Rhapsody 8.4. It has general functions like to turn on/off the various lamps(parking,ignition status,gear position,etc.) on dashboard which works fine. Now, we have generated the code in rhapsody as .h and .cpp files. We created an empty C++ project in VS 2019, added files for OXF framework, adaptor files and also the above generated files. The folder structure as below: enter image description here

When we compiled this project, we had all kinds of errors related to not being able to find the OXF framework which we were able to fix after adding proper #include paths in header files. We also have written a wrapper file which will allow us to be able to import the generated dll into another WPF project and use it there.However after removing the path errors,project could not be successfully compiled as we are still looking at one error which says *

'OMReactive':'class' type redefinition.

Before posting here I have spent 3 weeks researching on google, on IBM rhapsody website and also on stackoverflow.com and none of the solutions provided has worked for me.I know that above error means that somewhere some file in included twice.I have tried using #include guards and also #pragma once, but this has not resolved my issue. Please if anybody has any idea what is going on here? I have tried to explain and give as much as information as possible.Let me know if any more information is needed. Apologies if I have missed out on any information or unclear about anything.I am at a dead end now and need help. Any ideas, any suggestions? what should I try next? I wonder if the steps I followed to add the rhapsody models into VS 2019 is incorrect or Rhapsody framework not properly included or missing some file somewhere.Please let me know proper steps. IBM Rhapody website does not have exact information on what I am trying to do. All I want do to is generate a DLL out of the model classes to use in WPF project. Thanks for reading my question and sorry for being so long. Thanks.. Asma

1

There are 1 best solutions below

1
On

Rhapsody can generate code and a makefile. You can then build that from inside Rhapsody (it calls the makefile) You have to select the compiler in your configuration (under Component) You can use VS17 there, it will work for VS19 as well. If you create a VisualStudio Configuration (right click on your Component and then select Add VS Configuration) Rhapsody will link to a VS project and deploy your files directly. If that does not work: try using a Willert Framework ( have to be bought) Yet another option would be to generate code in Java. Rhapsody brings its own JRE. Since you do Systems Engineering you do probably not need to use C or C++.

Walter