0181-0182.html

来自「linux-unix130.linux.and.unix.ebooks130 l」· HTML 代码 · 共 303 行

HTML
303
字号
<HTML>



<HEAD>

<TITLE>Linux Complete Command Reference:User Commands:EarthWeb Inc.-</TITLE>

</HEAD>

<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
        var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>

 -->




<!-- ISBN=0672311046 //-->

<!-- TITLE=Linux Complete Command Reference//-->

<!-- AUTHOR=Red Hat//-->

<!-- PUBLISHER=Macmillan Computer Publishing//-->

<!-- IMPRINT=Sams//-->

<!-- CHAPTER=01 //-->

<!-- PAGES=0001-0736 //-->

<!-- UNASSIGNED1 //-->

<!-- UNASSIGNED2 //-->



<P><CENTER>

<a href="0179-0180.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0183-0183.html">Next</A></CENTER></P>







<A NAME="PAGENUM-181"><P>Page 181</P></A>





<TABLE>



<TR><TD>

_P

</TD><TD>

Tell the preprocessor not to generate #line commands. Used with the

_E option.

</TD></TR><TR><TD>

_M [_MG]

</TD><TD>

Tell the preprocessor to output a rule suitable for

make describing the dependencies of each object file. For each source file, the preprocessor outputs one

make -rule whose target is the object filename for that source file and whose dependencies are all the files that have

been included with #include. This rule may be a single line or may be continued with

\-newline if it is long. The list of rules is printed on standard output instead of the preprocessed C program.<BR>

   _M implies _E.<BR>

   _MG says to treat missing header files as generated files and assume they live in the same

directory as the source file. It must be specified in addition to

_M.

</TD></TR><TR><TD>

_MM [_MG]

</TD><TD>

Like _M but the output mentions only the user header files included with

#include &quot; file &quot;. System header files included with

#include &lt; file &gt; are omitted.

</TD></TR><TR><TD>

_MD

</TD><TD>

Like _M but the dependency information is written to files with names made by replacing

.o with .d at the end of the output filenames. This is in addition to compiling the file as

specified; _MD does not inhibit ordinary compilation the way

_M does.

  The Mach utility md can be used to merge the

.d files into a single dependency file suitable

for using with the make command.

</TD></TR><TR><TD>

_MMD

</TD><TD>

Like _MD except mention only user header files, not system header files.

</TD></TR><TR><TD>

_H

</TD><TD>

Print the name of each header file used, in addition to other normal activities.

</TD></TR><TR><TD>

_Aquestion(answer)

</TD><TD>

Assert the answer answer

for question, in case it is tested with a preprocessor conditional such

as #if #question(answer). _A_ disables the standard assertions that normally describe the

target machine.

</TD></TR><TR><TD>

_Aquestion ( answer )

</TD><TD>

Assert the answer

answer for question, in case it is tested with a preprocessor conditional such

as #if # question ( answer ). _A_disables the standard assertions that normally describe the

target machine.

</TD></TR><TR><TD>

_Dmacro

</TD><TD>

Define macro macro with the string

1 as its definition.

</TD></TR><TR><TD>

_Dmacro=defn

</TD><TD>

Define macro macro as defn. All instances of

_D on the command line are processed before any <BR>

_U options.

</TD></TR><TR><TD>

_Umacro

</TD><TD>

Undefine macro macro. _U options are evaluated after all

_D options, but before any _include and _imacros options.

</TD></TR><TR><TD>

_dM

</TD><TD>

Tell the preprocessor to output only a list of the macro definitions that are in effect at the

end of preprocessing. Used with the _E option.

</TD></TR><TR><TD>

_dD

</TD><TD>

Tell the preprocessor to pass all macro definitions into the output, in their proper sequence

in the rest of the output.

</TD></TR><TR><TD>

_dN

</TD><TD>

Like _dD except that the macro arguments and contents are omitted. Only

#define name is included in the output.

</TD></TR></TABLE>



<P><B>

ASSEMBLER OPTION

</B>

</P>



<TABLE>



<TR><TD>

_Wa,option

</TD><TD>

Pass option as an option to the assembler. If

option contains commas, it is split into multiple options at the commas.

</TD></TR></TABLE>



<P><B>

LINKER OPTIONS

</B>

</P>



<P>These options come into play when the compiler links object files into an executable output file. They are meaningless if

the compiler is not doing a link step.

</P>



<TABLE>



<TR><TD>

object-file-name

</TD><TD>

A filename that does not end in a special recognized suffix is considered to name an object

file or library. (Object files are distinguished from libraries by the linker according to the

file contents.) If gcc does a link step, these object files are used as input to the linker.

</TD></TR><TR><TD>

_llibrary

</TD><TD>

Use the library named library when linking.

 The linker searches a standard list of directories for the library, which is actually a file

named lib library.a. The linker then uses this file as if it had been specified precisely by name.

</TD></TR></TABLE>





<A NAME="PAGENUM-182"><P>Page 182</P></A>



<TABLE>



<TR><TD>

</TD><TD>

The directories searched include several standard system directories plus any that you

specify with _L.<BR>

Normally, the files found this way are library files&#151;archive files whose members are object

files. The linker handles an archive file by scanning through it for members that define symbols

that have so far been referenced but not defined. However, if the linker finds an ordinary object

file rather than a library, the object file is linked in the usual fashion. The only difference

between using an _l option and specifying a filename is that

_l surrounds library with lib and .a and searches several directories.

</TD></TR><TR><TD>

_lobjc

</TD><TD>

You need this special case of the _l option in order to link an Objective C program.

</TD></TR><TR><TD>

_nostartfiles

</TD><TD>

Do not use the standard system startup files when linking. The standard libraries are

used normally.

</TD></TR><TR><TD>

_nostdlib

</TD><TD>

Don't use the standard system libraries and startup files when linking. Only the files you

specify will be passed to the linker.

</TD></TR><TR><TD>

_static

</TD><TD>

On systems that support dynamic linking, this prevents linking with the shared libraries.

On other systems, this option has no effect.

</TD></TR><TR><TD>

_shared

</TD><TD>

Produce a shared object which can then be linked with other objects to form an

executable. Only a few systems support this option.

</TD></TR><TR><TD>

_symbolic

</TD><TD>

Bind references to global symbols when building a shared object. Warn about any

unresolved references (unless overridden by the link editor option

_Xlinker _z _Xlinker defs). Only a few systems support this option.

</TD></TR><TR><TD>

_Xlinker option

</TD><TD>

Pass option as an option to the linker. You can use this to supply system-specific linker

options which GNU CC does not know how to recognize.

If you want to pass an option that takes an argument, you must use

_Xlinker twice: once for the option and once for the argument. For example, to pass

_assert definitions, you must write _Xlinker _assert _Xlinker

definitions. It does not work to write _Xlinker

&quot;_assert definitions&quot;, because this passes the entire string as a single argument, which is not what

the linker expects.

</TD></TR><TR><TD>

_Wl,option

</TD><TD>

Pass option as an option to the linker. If

option contains commas, it is split into multiple options at the commas.

</TD></TR><TR><TD>

_u symbol

</TD><TD>

Pretend the symbol symbol is undefined, to force linking of library modules to define it.

You can use _u multiple times with different symbols to force loading of additional library modules.

</TD></TR></TABLE>





<P><B>

DIRECTIORY OPTIONS

</B>

</P>



<P>These options specify directories to search for header files, for libraries, and for parts of the compiler:

</P>



<TABLE>



<TR><TD>

_Idir

</TD><TD>

Append directory dir to the list of directories searched for include files.

</TD></TR><TR><TD>

_I_

</TD><TD>

Any directories you specify with _I options before the

_I_ option are searched only for the case of #include

&quot;file&quot;; they are not searched for #include

&lt;file&gt;.<BR>

  If additional directories are specified with

_I options after the _I_, these directories are

searched for all #include directives. (Ordinarily all

_I directories are used this way.)

<BR>

 In addition, the _I_ option inhibits the use of the current directory (where the current input

file came from) as the first search directory for #include &quot;

file &quot;. There is no way to override this effect

of _I_. With _I. you can specify searching the directory that was current when

the compiler was invoked. That is not exactly the same as what the preprocessor does by

default, but it is often satisfactory.

<BR>

 _I_ does not inhibit the use of the standard system directories for header files. Thus,

_I_ and

_nostdinc are independent.

</TD></TR><TR><TD>

_Ldir

</TD><TD>

 Add directory dir to the list of directories to be searched for

_l.

</TD></TR><TR><TD>

_Bprefix

</TD><TD>

This option specifies where to find the executables, libraries, and data files of the compiler itself.

  The compiler driver program runs one or more of the subprograms

cpp, cc1 (or, for C++, cc1plus), as, and ld. It tries

prefix as a prefix for each program it tries to run, both with

and without machine / version /.

</TD></TR></TABLE>









<P><CENTER>

<a href="0179-0180.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0183-0183.html">Next</A></CENTER></P>







</td>
</tr>
</table>

<!-- begin footer information -->







</body></html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?