Directory-Options.html 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- Copyright (C) 1999-2017 Free Software Foundation, Inc.
  4. Permission is granted to copy, distribute and/or modify this document
  5. under the terms of the GNU Free Documentation License, Version 1.3 or
  6. any later version published by the Free Software Foundation; with the
  7. Invariant Sections being "Funding Free Software", the Front-Cover
  8. Texts being (a) (see below), and with the Back-Cover Texts being (b)
  9. (see below). A copy of the license is included in the section entitled
  10. "GNU Free Documentation License".
  11. (a) The FSF's Front-Cover Text is:
  12. A GNU Manual
  13. (b) The FSF's Back-Cover Text is:
  14. You have freedom to copy and modify this GNU Manual, like GNU
  15. software. Copies published by the Free Software Foundation raise
  16. funds for GNU development. -->
  17. <!-- Created by GNU Texinfo 5.2, http://www.gnu.org/software/texinfo/ -->
  18. <head>
  19. <title>The GNU Fortran Compiler: Directory Options</title>
  20. <meta name="description" content="The GNU Fortran Compiler: Directory Options">
  21. <meta name="keywords" content="The GNU Fortran Compiler: Directory Options">
  22. <meta name="resource-type" content="document">
  23. <meta name="distribution" content="global">
  24. <meta name="Generator" content="makeinfo">
  25. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  26. <link href="index.html#Top" rel="start" title="Top">
  27. <link href="Option-Index.html#Option-Index" rel="index" title="Option Index">
  28. <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
  29. <link href="Invoking-GNU-Fortran.html#Invoking-GNU-Fortran" rel="up" title="Invoking GNU Fortran">
  30. <link href="Link-Options.html#Link-Options" rel="next" title="Link Options">
  31. <link href="Debugging-Options.html#Debugging-Options" rel="prev" title="Debugging Options">
  32. <style type="text/css">
  33. <!--
  34. a.summary-letter {text-decoration: none}
  35. blockquote.smallquotation {font-size: smaller}
  36. div.display {margin-left: 3.2em}
  37. div.example {margin-left: 3.2em}
  38. div.indentedblock {margin-left: 3.2em}
  39. div.lisp {margin-left: 3.2em}
  40. div.smalldisplay {margin-left: 3.2em}
  41. div.smallexample {margin-left: 3.2em}
  42. div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
  43. div.smalllisp {margin-left: 3.2em}
  44. kbd {font-style:oblique}
  45. pre.display {font-family: inherit}
  46. pre.format {font-family: inherit}
  47. pre.menu-comment {font-family: serif}
  48. pre.menu-preformatted {font-family: serif}
  49. pre.smalldisplay {font-family: inherit; font-size: smaller}
  50. pre.smallexample {font-size: smaller}
  51. pre.smallformat {font-family: inherit; font-size: smaller}
  52. pre.smalllisp {font-size: smaller}
  53. span.nocodebreak {white-space:nowrap}
  54. span.nolinebreak {white-space:nowrap}
  55. span.roman {font-family:serif; font-weight:normal}
  56. span.sansserif {font-family:sans-serif; font-weight:normal}
  57. ul.no-bullet {list-style: none}
  58. -->
  59. </style>
  60. </head>
  61. <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
  62. <a name="Directory-Options"></a>
  63. <div class="header">
  64. <p>
  65. Next: <a href="Link-Options.html#Link-Options" accesskey="n" rel="next">Link Options</a>, Previous: <a href="Debugging-Options.html#Debugging-Options" accesskey="p" rel="prev">Debugging Options</a>, Up: <a href="Invoking-GNU-Fortran.html#Invoking-GNU-Fortran" accesskey="u" rel="up">Invoking GNU Fortran</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html#Option-Index" title="Index" rel="index">Index</a>]</p>
  66. </div>
  67. <hr>
  68. <a name="Options-for-directory-search"></a>
  69. <h3 class="section">2.6 Options for directory search</h3>
  70. <a name="index-directory_002c-options"></a>
  71. <a name="index-options_002c-directory-search"></a>
  72. <a name="index-search-path"></a>
  73. <a name="index-INCLUDE-directive"></a>
  74. <a name="index-directive_002c-INCLUDE"></a>
  75. <p>These options affect how GNU Fortran searches
  76. for files specified by the <code>INCLUDE</code> directive and where it searches
  77. for previously compiled modules.
  78. </p>
  79. <p>It also affects the search paths used by <code>cpp</code> when used to preprocess
  80. Fortran source.
  81. </p>
  82. <dl compact="compact">
  83. <dt><code>-I<var>dir</var></code></dt>
  84. <dd><a name="index-Idir"></a>
  85. <a name="index-directory_002c-search-paths-for-inclusion"></a>
  86. <a name="index-inclusion_002c-directory-search-paths-for"></a>
  87. <a name="index-search-paths_002c-for-included-files"></a>
  88. <a name="index-paths_002c-search"></a>
  89. <a name="index-module-search-path"></a>
  90. <p>These affect interpretation of the <code>INCLUDE</code> directive
  91. (as well as of the <code>#include</code> directive of the <code>cpp</code>
  92. preprocessor).
  93. </p>
  94. <p>Also note that the general behavior of <samp>-I</samp> and
  95. <code>INCLUDE</code> is pretty much the same as of <samp>-I</samp> with
  96. <code>#include</code> in the <code>cpp</code> preprocessor, with regard to
  97. looking for <samp>header.gcc</samp> files and other such things.
  98. </p>
  99. <p>This path is also used to search for <samp>.mod</samp> files when previously
  100. compiled modules are required by a <code>USE</code> statement.
  101. </p>
  102. <p>See <a href="http://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html#Directory-Options">Options for Directory Search</a> in <cite>Using the GNU Compiler Collection (GCC)</cite>, for information on the
  103. <samp>-I</samp> option.
  104. </p>
  105. </dd>
  106. <dt><code>-J<var>dir</var></code></dt>
  107. <dd><a name="index-Jdir"></a>
  108. <a name="index-Mdir"></a>
  109. <a name="index-paths_002c-search-1"></a>
  110. <a name="index-module-search-path-1"></a>
  111. <p>This option specifies where to put <samp>.mod</samp> files for compiled modules.
  112. It is also added to the list of directories to searched by an <code>USE</code>
  113. statement.
  114. </p>
  115. <p>The default is the current directory.
  116. </p>
  117. </dd>
  118. <dt><code>-fintrinsic-modules-path <var>dir</var></code></dt>
  119. <dd><a name="index-fintrinsic_002dmodules_002dpath-dir"></a>
  120. <a name="index-paths_002c-search-2"></a>
  121. <a name="index-module-search-path-2"></a>
  122. <p>This option specifies the location of pre-compiled intrinsic modules, if
  123. they are not in the default location expected by the compiler.
  124. </p></dd>
  125. </dl>
  126. </body>
  127. </html>