Chapter Contents

Previous

Next
SAS/C C++ Development System User's Guide, Release 6.50


Translating C++ Programs under OpenEdition

The compiler drivers sascc370 and  sasCC370 control the translation, compilation, and link-editing of C++ programs under OpenEdition. The following syntax is used to translate, compile, and/or link a C++ program from the OpenEdition shell:
sascc370 [options] filename1
[filename2 ...]
sasCC370 [options] filename1 [filename2 ...]
 

The options argument is a list of SAS/C Compiler options, COOL prelinker options, and/or MVS linkage editor options (for details, see the SAS/C Compiler and Library User's Guide). You can also specify the C++ translator options as described in Option Descriptions . (footnote 1) It also lists the SAS/C Compiler options that are not valid for C++ compilations. The filename arguments may contain any combination of C++ source files, C source files, object modules, and ar370 archives.  sascc370 invokes the C++ translator if any input file has a  .C or  .cxx extension, or if you specify the  -cxx compiler option.  sasCC370 invokes the C++ translator if any input file has a  .c ,  .C , or  .cxx extension. 

If you do not suppress the prelinking step with the -c compiler option, both  sascc370 and  sasCC370 invoke the COOL prelinker followed by the linkage editor to link the object files. The C++ library is automatically added to the prelinking step if any C++ translations have occurred. 

The input source files may reside either in the OpenEdition hierarchical file system (HFS) or in a standard MVS partitioned data set. The following example illustrates the use of an HFS file:
sasCC370 ./proj/sort.cxx
 

If this program was located in an MVS PDS member named YOURLOG.PROJ4.CXX(SORT), the compiler could be invoked from the OpenEdition shell as follows:
sasCC370 '//dsn:yourlog.proj4.cxx(sort)'
 

In either case, the compiled and linked output module is stored in the file a.out in your current directory. To specify another file, use the  -o option. For example, the following command stores the output module in the file  ./proj5/sort :
sasCC370 -o ./proj5/sort ./proj5/sort.cxx
 

To invoke the sascc370 or  sasCC370 command, you must include the directory where SAS/C was installed in your PATH environment variable. Typically, your site will define PATH appropriately for you when you start up the shell. If your site does not define PATH for you, contact your SAS Software Representative for C compiler products to obtain the correct directory name and add it to your PATH. 

For additional information about compiling programs under the OpenEdition shell, see the SAS/C Compiler and Library User's Guide.


FOOTNOTE 1:  C++ translator options are processed by the translator itself, not by the compiler. [arrow]


Chapter Contents

Previous

Next

Top of Page

Copyright © Tue Feb 10 12:11:23 EST 1998 by SAS Institute Inc., Cary, NC, USA. All rights reserved.