IBM Support

cpp.exe: Usage: cpp.exe [switches] input output

Troubleshooting


Problem

cpp.exe: Usage: cpp.exe [switches] input output

Resolving The Problem

SYMPTOM:
When building a Rose RealTime model the following error occurs:

cpp.exe: Usage:
C:\Tornado\host\x86-win32\lib\gcc-lib\powerpc-wrs-vxworks\cygnus-2.7.2-960126\cp
p.exe [switches] input output


CAUSE:
This error indicates that something in the compile command is not understood by
the executable cpp.exe.

A common problem is spaces in a path passed to the compiler. For example if the
following flag and directory were passed to the compiler:

-I"C:\Program Files\Rational\Rose
RealTime/C++/TargetRTS/libset/ppc-cygnus-2.7.2-960126"

The compiler would see the flag up to the first space, -IC:\Program, but would
not understand Files\Rational\Rose or
RealTime/C++/TargetRTS/libset/ppc-cygnus-2.7.2-960126


RESOLUTION:
1) Open the component specification, Compilation tab and remove the silent
option -s from the CompilationMakeArguments. This will give a more detailed out
of the build.

ccppc -c -o Comm.o -DPRAGMA -DCPU=PPC603 -ansi -nostdinc -IC:\Tornado/target/h
-I"C:\Program Files\Rational\Rose
RealTime/C++/TargetRTS/libset/ppc-cygnus-2.7.2-960126" -I"C:\Program
Files\Rational\Rose RealTime/C++/TargetRTS/target/TORNADO2T" -I"C:\Program
Files\Rational\Rose RealTime/C++/TargetRTS/include" \
-g -I../src \
../src/Comm.cpp
!> Compiling Comm
cpp.exe: Usage:
C:\Tornado\host\x86-win32\lib\gcc-lib\powerpc-wrs-vxworks\cygnus-2.7.2-960126\cp
p.exe [switches] input output

2) Open a command prompt and change to the src directory for your component.
Copy the entire ccppc command from step 1) and paste it to the command prompt.
The same error should be displayed. Remove flags one at a time and rerun the
command until it is known which flag(s) are causing the problem.

C:\Temp\Tornado2T\src>ccppc -c -o Comm.o -DPRAGMA -DCPU=PPC603 -ansi
-nostdinc -IC:\Tornado/target/h
-g -I../src ../src/Comm.cpp
In file included from ../src/Comm.h:10,
from ../src/Comm.cpp:7:
../src/RTSystem/Tornado2T.h:10: RTStructures.h: No such file or directory

In this case when the flags with spaces in the path were removed, the Usage
error is gone.

3) Once it is determined which flags are causing the Usage error, they will
have to be corrected. If the problem is spaces in the %ROSERT_HOME% path,
change it from "C:\Program Files\Rational\Rose RealTime" to
"C:\PROGRA~1\Rational\ROSERE~1" in the Windows Environment and the Rose
RealTime Path Map variables.

For detailed instructions on removing spaces in paths, see the related Solution
11084.





[{"Product":{"code":"SSSHKL","label":"Rational Rose RealTime"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"--","Platform":[{"code":"PF033","label":"Windows"}],"Version":"2002.05.00.305.000","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Historical Number

115288735

Document Information

More support for:
Rational Rose RealTime

Software version:
2002.05.00.305.000

Operating system(s):
Windows

Document number:
73585

Modified date:
16 June 2018

UID

swg21120144