Troubleshooting
Problem
In the release notes for IBM Rational Rose RealTime 2002 patch GA-02, the following note appears in the "What's New" section: "Reuse target build environment when building models using target setup script, setup.pl and vssetup.pl to get the Microsoft Visual Studio environment directly from the registry." However, there are no further details on how to use the vssetup.pl script to get the Microsoft Visual Studio environment directly from the registry?
Resolving The Problem
Note: The online documentation in Rose RealTime 2003 has been updated with the following information, "To use vssetup.pl, add the following to the CodeGenMakeCommand:"
rtperl -S vssetup.pl $defaultMakeCommand
After installing Rose RealTime 2002 patch GA-02, the default value for the CompilationMakeCommand (Component, C++ Compilation) property is:
rtperl -S rtsetup.pl $defaultMakeCommand
This will retrieve the Microsoft Visual Studio environment from the registry. However, to get to the compilation stage of the build process, nmake must be in the user's path. If nmake is not in the user's path the following error will occur:
rtrun Error: Failed to create process for: 'nmake -nologo ...
To use vssetup.pl to get the location of nmake from the registry as well, set the CodeGenMakeCommand (Component, C++ Generation) property to:
rtperl -S vssetup.pl $defaultMakeCommand
If you are using Microsoft Visual Studio 7.0 (.NET), use the following command:
rtperl -S vs7setup.pl $defaultMakeCommand
You will have to create this file as it does not exist yet. Defect RATLC00514659 has been opened to address this problem. In the meantime, create the following file in
C:\Program Files\Rational\Rose RealTime\bin\win32\vs7vsetup.pl
with the following contents:
#! perl -w
require "$ENV{'ROSERT_HOME'}/C++/TargetRTS/tools/registry.pl";
$vcKey = 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio'
. '\\7.0\\Setup\\VC';
$vcSub = 'ProductDir';
unless( $vcRoot = &ReadRegEntry( $vcKey, $vcSub, '' ) )
{
print STDERR "Can't find registry VC location '$vcSub' at\n$vcKey\n\n";
exit 1;
}
$ENV{'PATH'} = "$vcRoot\\bin;" . $ENV{'PATH'};
# add double quotes around arguments that contain spaces.
foreach ( @ARGV )
{
s/^.*\s.*$/"$&"/;
}
$status = system( @ARGV );
exit $status if( $status & 0xFF );
exit $status >> 8;
Related Information
Historical Number
119746603
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21136480