12.07.2015 Views

PGI User's Guide

PGI User's Guide

PGI User's Guide

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Filename Conventions6When linking a program with a library, the linker extracts only those library components that the programneeds. The compiler drivers link in several libraries by default. For more information about libraries, refer toChapter 9, “Creating and Using Libraries”.Output FilesBy default, an executable output file produced by one of the <strong>PGI</strong> compilers is placed in the file a.out, or, onWindows, in a filename based on the name of the first source or object file on the command line. As theexample in the preceding section shows, you can use the –o option to specify the output file name.If you use one of the options: –F (Fortran only), –P (C/C++ only), –S or –c, the compiler produces a filecontaining the output of the last completed phase for each input file, as specified by the option supplied. Theoutput file will be a preprocessed source file, an assembly-language file, or an unlinked object file respectively.Similarly, the –E option does not produce a file, but displays the preprocessed source file on the standardoutput. Using any of these options, the –o option is valid only if you specify a single input file. If no errorsoccur during processing, you can use the files created by these options as input to a future invocation of any ofthe <strong>PGI</strong> compiler drivers. The following table lists the stop-after options and the output files that the compilerscreate when you use these options. It also describes the accepted input files.Table 1.1. Stop-after Options, Inputs and OutputsOption Stop after Input Output–E preprocessing Source files. preprocessed file to standard out–F preprocessing Source files. This option is not validfor pgcc or pgcpp.–P preprocessing Source files. This option is not validfor pgf77, pgf95, pgfortran or pghpf.preprocessed file (.f)preprocessed file (.i)–S compilation Source files or preprocessed files. assembly-language file (.s)–c assembly Source files, preprocessed files orassembly-language files.none linking Source files, preprocessed files,assembly-language files, object filesor libraries.unlinked object file (.o or .obj)executable file (a.out or .exe)If you specify multiple input files or do not specify an object filename, the compiler uses the input filenamesto derive corresponding default output filenames of the following form, where filename is the input filenamewithout its extension:filename.findicates a preprocessed file, if you compiled a Fortran file using the –F option.filename.iindicates a preprocessed file, if you compiled using the –P option.filename.lstindicates a listing file from the –Mlist option.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!