⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 environment-variables.html

📁 gcc手册
💻 HTML
字号:
<html lang="en">

<head>

<title>The C Preprocessor</title>

<meta http-equiv="Content-Type" content="text/html">

<meta name="description" content="The C Preprocessor">

<meta name="generator" content="makeinfo 4.3">

<link href="http://www.gnu.org/software/texinfo/" rel="generator-home">

<!--

Copyright &copy; 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996,

1997, 1998, 1999, 2000, 2001, 2002, 2003

Free Software Foundation, Inc.



   <p>Permission is granted to copy, distribute and/or modify this document

under the terms of the GNU Free Documentation License, Version 1.1 or

any later version published by the Free Software Foundation.  A copy of

the license is included in the

section entitled "GNU Free Documentation License".



   <p>This manual contains no Invariant Sections.  The Front-Cover Texts are

(a) (see below), and the Back-Cover Texts are (b) (see below).



   <p>(a) The FSF's Front-Cover Text is:



   <p>A GNU Manual



   <p>(b) The FSF's Back-Cover Text is:



   <p>You have freedom to copy and modify this GNU Manual, like GNU

     software.  Copies published by the Free Software Foundation raise

     funds for GNU development. 

-->

</head>

<body>

<div class="node">

<p>

Node:<a name="Environment%20Variables">Environment Variables</a>,

Next:<a rel="next" accesskey="n" href="GNU-Free-Documentation-License.html#GNU%20Free%20Documentation%20License">GNU Free Documentation License</a>,

Previous:<a rel="previous" accesskey="p" href="Invocation.html#Invocation">Invocation</a>,

Up:<a rel="up" accesskey="u" href="index.html#Top">Top</a>

<hr><br>

</div>



<h2 class="chapter">Environment Variables</h2>



   <p>This section describes the environment variables that affect how CPP

operates.  You can use them to specify directories or prefixes to use

when searching for include files, or to control dependency output.



   <p>Note that you can also specify places to search using options such as

<code>-I</code>, and control dependency output with options like

<code>-M</code> (see <a href="Invocation.html#Invocation">Invocation</a>).  These take precedence over

environment variables, which in turn take precedence over the

configuration of GCC.



     <dl>

<dt><code>CPATH</code>

     <dd><dt><code>C_INCLUDE_PATH</code>

     <dd><dt><code>CPLUS_INCLUDE_PATH</code>

     <dd><dt><code>OBJC_INCLUDE_PATH</code>

     <dd>Each variable's value is a list of directories separated by a special

character, much like <code>PATH</code>, in which to look for header files. 

The special character, <code>PATH_SEPARATOR</code>, is target-dependent and

determined at GCC build time.  For Windows-based targets it is a

semicolon, and for almost all other targets it is a colon.



     <p><code>CPATH</code> specifies a list of directories to be searched as if

specified with <code>-I</code>, but after any paths given with <code>-I</code>

options on the command line.  This environment variable is used

regardless of which language is being preprocessed.



     <p>The remaining environment variables apply only when preprocessing the

particular language indicated.  Each specifies a list of directories

to be searched as if specified with <code>-isystem</code>, but after any

paths given with <code>-isystem</code> options on the command line.



     <p>In all these variables, an empty element instructs the compiler to

search its current working directory.  Empty elements can appear at the

beginning or end of a path.  For instance, if the value of

<code>CPATH</code> is <code>:/special/include</code>, that has the same

effect as <code>-I.&nbsp;-I/special/include</code>.



     <p>See also <a href="Search-Path.html#Search%20Path">Search Path</a>.



     <br><dt><code>DEPENDENCIES_OUTPUT</code>

     <dd>If this variable is set, its value specifies how to output

dependencies for Make based on the non-system header files processed

by the compiler.  System header files are ignored in the dependency

output.



     <p>The value of <code>DEPENDENCIES_OUTPUT</code> can be just a file name, in

which case the Make rules are written to that file, guessing the target

name from the source file name.  Or the value can have the form

<code></code><var>file</var><code> </code><var>target</var><code></code>, in which case the rules are written to

file <var>file</var> using <var>target</var> as the target name.



     <p>In other words, this environment variable is equivalent to combining

the options <code>-MM</code> and <code>-MF</code>

(see <a href="Invocation.html#Invocation">Invocation</a>),

with an optional <code>-MT</code> switch too.



     <br><dt><code>SUNPRO_DEPENDENCIES</code>

     <dd>This variable is the same as <code>DEPENDENCIES_OUTPUT</code> (see above),

except that system header files are not ignored, so it implies

<code>-M</code> rather than <code>-MM</code>.  However, the dependence on the

main input file is omitted. 

See <a href="Invocation.html#Invocation">Invocation</a>. 

</dl>



   </body></html>



⌨️ 快捷键说明

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