Question & Answer
Question
How do you configure IBM Rational Rhapsody 8.1 to use the Microsoft Visual Studio 2013 compiler?
Cause
You wish to compile Rational Rhapsody projects with the Microsoft Visual Studio 2013 compiler.
Answer
Procedure:
- Install Rational Rhapsody 8.1 and Microsoft Visual Studio 2013.
- In <RHAPSODY_ROOT>\Share\Properties\siteC++.prp add the section:
Subject CPP_CG
Metaclass MSVC
Property IDEVersion Enum "VC9,VC10,VC11,VC12" "VC10"
end
end
Note, the prp file must contain an extra "end" after this section.
- Browse to the <RHAPSODY _ROOT>\Share\etc folder and open the msvcmake.bat file
- Copy the line
if "%4"=="VC11" set VS_PATH=C:\Program Files (x86)\Microsoft Visual Studio 11.0\
and paste a new line beneath with the following changes
if "%4"=="VC12" set VS_PATH=C:\Program Files (x86)\Microsoft Visual Studio 12.0\
- Copy the line
@echo VC11 - Visual Studio 2012
And paste with changes
@echo VC12 - Visual Studio 2013
- Open the <RHAPSODY_ROOT>\Share\LangCpp\msbuild.mak and change the section:
CRT_FLAGS=/D "_CRT_SECURE_NO_DEPRECATE" /MP
ENABLE_EH=/EHa
LIB_PREFIX=MS$(MS_VER)$(CPU)$(MT_PREFIX)$(STL_SUFFIX)
!IF "$(MS_VER)" != "VC9"
!IF "$(MS_VER)" != "VC10"
!IF "$(MS_VER)" != "VC11"
!MESSAGE Library is built for unsupported environment
!MESSAGE The following options are set:
!MESSAGE CRT_FLAGS=
!MESSAGE ENABLE_EH=/GX
!MESSAGE LIB_PREFIX=MS$(STL_SUFFIX)
CRT_FLAGS=
ENABLE_EH=/GX
LIB_PREFIX=MS$(STL_SUFFIX)
!ENDIF
!ENDIF
!ENDIF
so that it looks like this:
CRT_FLAGS=/D "_CRT_SECURE_NO_DEPRECATE" /MP
ENABLE_EH=/EHa
LIB_PREFIX=MS$(MS_VER)$(CPU)$(MT_PREFIX)$(STL_SUFFIX)
!IF "$(MS_VER)" != "VC9"
!IF "$(MS_VER)" != "VC10"
!IF "$(MS_VER)" != "VC11"
!IF "$(MS_VER)" != "VC12"
!MESSAGE Library is built for unsupported environment
!MESSAGE The following options are set:
!MESSAGE CRT_FLAGS=
!MESSAGE ENABLE_EH=/GX
!MESSAGE LIB_PREFIX=MS$(STL_SUFFIX)
CRT_FLAGS=
ENABLE_EH=/GX
LIB_PREFIX=MS$(STL_SUFFIX)
!ENDIF
!ENDIF
!ENDIF
!ENDIF
- Open Rational Rhapsody8.1 and load a sample project. For example,
<RHAPSODY _ROOT>\Samples\CppSamples\Dishwasher
- Select the Project’s Active Component/Configuration. For example, EXE and Host
- Double-click the configuration in the browser and open the features window. Select the Properties tab and find the CPP_CG::MSVC::IDEVersion property. Switch the value to VC12
- Run the Build Framework command in the Code menu.
- Once this is completed you can then build and run the sample project via the Code menu > Generate/Make/Run command
[{"Product":{"code":"SSB2MU","label":"IBM Engineering Systems Design Rhapsody"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Integrations - 3rd Party","Platform":[{"code":"PF033","label":"Windows"}],"Version":"8.1","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]
Product Synonym
Rational Rhapsody
Was this topic helpful?
Document Information
Modified date:
27 May 2022
UID
swg21677103