Technical data
Cray Standard C/C++ Reference Manual
In the first line, the -X option is passed only to the compiler, and the number of
PEs is set to 8 at compile time. In the second line, the -X option is passed only to
the loader and the number of PEs is set to 8 at load time.
If the number of PEs is specified at both compile and load time, the compile-time
constant overrides the load-time constant. If the two values disagree, the loader
issues a message.
2.23 Command Line Examples
The following examples illustrate a variety of CC and cc command lines.
• The following example compiles myprog.C on UNICOS/mk systems, fixing
the number of processing elements (PEs) to 8 and instantiating all template
entities that are declared or referenced in the compilation unit.
CC -X8 -h instantiate=all myprog.C
• The following example compiles myprog.C. The -h conform option
specifies strict conformance to the ISO C++ standard. No automatic
instantiation of templates is performed.
CC -h conform -h noautoinstantiate myprog.C
• The following example compiles input files myprog.C and subprog.C.
Option -c specifies that object files myprog.o and subprog.o are produced
and that the loader is not called. Option -h inline1 instructs the compiler
to inline function calls declared with the inline keyword or those declared
within a class declaration.
CC -c -h inline1 myprog.C subprog.C
• The following example specifies that the compiler search the current working
directory (represented by a period (.)) for #include files before searching
the default #include file locations.
CC -I. disc.C vend.C
• The following example specifies that source file newprog.c be preprocessed
only. Compilation and linking are suppressed. In addition, the macro DEBUG
is defined.
cc -P -D DEBUG newprog.c
42 S–2179–36










