📄 configure.html
字号:
<html><head><META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>STLport: Configuration Manual</title><link href="doc.css" type="text/css" rel="stylesheet"></head><body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" vlink="#314A30" link="#314A30" text="black" bgcolor="white"><table border="0" cellspacing="0" cellpadding="0"><tr valign="top" align="left"><td width="24"><img src="images/trans.gif" border="0" height="1" width="24"></td><td width="776"><img border="0" height="14" width="1" src="images/trans.gif"><br><a href="../index.html"><img src="images/stl_logo_doc.gif" border="0" height="80" width="80"></a><a href="index.html"><img border="0" height="80" width="461" src="images/t_doc2.gif"></a><br><img src="images/trans.gif" border="0" height="24" width="1"><br><img src="images/black.gif" border="0" height="1" width="776"><br><img src="images/trans.gif" border="0" height="24" width="1"></td></tr><tr valign="top" align="left"><td width="24"><img src="images/trans.gif" border="0" height="1" width="24"></td><td width="776"><img src="images/trans.gif" border="0" height="10" width="776"></td></tr><tr valign="top" align="left"><td width="24"><img src="images/trans.gif" border="0" height="1" width="24"></td><td width="776">
<span class="heading">STLport Configuration Manual</span>
<p>
<font size="1"><em><strong>by Boris Fomitchev</strong></em></font>
</p>
<h3>Parameters</h3>
<p>There are two major categories of STLport configuration parameters:</p>
<ul>
<li>User-definable preferences</li>
<li>Parameters describing compiler bugs and misfeatures</li>
</ul>
<p>The former class lets you set some specific preferences. Switches
controlling these preferences are located in <stl_use_config.h>
header, which is self-documented. This manual provide some additional
info on them.</p>
<p>For the latter, STLport comes preconfigured for a wide
variety of compilers. <br>
See list for a complete list of compilers that STLport automatically
recognizes.<br>
If your compiler is not being recognized properly, this document will
help you to fix the problem.</p>
<p> </p>
<h3>User-defined preferences</h3>
<p>You may specify some user-defined preferences for STLport. There are
two ways to set the options up :</p>
<ol>
<li>Setting corresponding #define in <stl_user_config.h> . This
is the preferred method. You can also use different <stl_user_config.h>
headers for different projects.</li>
<li>Specifying corresponding flag on compiler command-line. Some
options also may be suppressed. For example, you may configure the
distribution to exploit exception handling with setting <b>_STLP_USE_EXCEPTIONS</b>
macro to 1, then turning exception handling off with <b>-D_STLP_NO_EXCEPTIONS</b>
command-line option for particular project</li>
</ol>
<p>Below is a stable set of of user-defined options with description. If
not indicated otherwise, default for these options is that they are
undefined.<br>
</p>
<table border="1" cellspacing="0" cellpadding="4">
<caption>
<h4>User-defined options for STLport</h4>
</caption>
<tr>
<td><b>Controlling Macro</b></td>
<td><b>Description</b></td>
</tr>
<tr>
<td><font size="1" face="Arial, Helvetica"><b>_STLP_NO_OWN_IOSTREAMS
</b></font></td>
<td><font face="Arial, Helvetica" size="2">This switch is used to select
one from two major STLport iostream modes. Please visit <a href="select_io.html">"Getting Started"</a> section for details.
</font></td>
</tr>
<tr>
<td><font size="1" face="Arial, Helvetica"><b>_STLP_NO_NEW_IOSTREAMS
</b></font></td>
<td><font face="Arial, Helvetica" size="2">Suppress using new-style
iostreams even if they are available. </font></td>
</tr>
<tr>
<td><font size="1" face="Arial, Helvetica"><b>_STLP_NO_IOSTREAMS
</b></font></td>
<td><font face="Arial, Helvetica" size="2">This switch is experimental and
is intended to be used in embedded environments. It makes STLport assume that
no iostreams are available at all. </font></td>
</tr>
<tr>
<td><font size="1" face="Arial, Helvetica"><b>_STLP_NO_OWN_NAMESPACE
</b></font></td>
<td><font face="Arial, Helvetica" size="2">Suppresses STLport use of
namespace <b>stlport</b>:: even if it is recommended, forces
STLport to use <b>std</b>::. Normally, STLport uses <b>_STL</b>::
namespace instead of <b>std</b>::, to prevent clashes with iostreams/string stuff that comes
with the compiler. </font></td>
</tr>
<tr>
<td><font size="1" face="Arial, Helvetica"><b>_STLP_USE_OWN_NAMESPACE
</b></font></td>
<td><font face="Arial, Helvetica" size="2">Forces STLport to use <b>_STL</b>::
namespace instead of <b>std</b>:: STLport sets this flag
automatically if _STLP_USE_NAMESPACES is set.</font></td>
</tr>
<tr>
<td><font size="1" face="Arial, Helvetica"><b>_STLP_DONT_RENAME_STD
</b></font></td>
<td><font face="Arial, Helvetica" size="2">Precludes STLport from redefining <b>std</b>::
to <b>_STL</b>::. Define it only if renaming scheme does not work for you for some reason.
</font></td>
</tr>
<tr>
<td><font size="1" face="Arial, Helvetica"><b>__STLPORT_NAMESPACE </b></font></td>
<td><font face="Arial, Helvetica" size="2">This is the namespace
STLport uses in the above case. Default is <b>_STL</b>. Do NOT try to
change it to <b>std</b>. </font></td>
</tr>
<tr>
<td><font size="1" face="Arial, Helvetica"><b>_STLP_USE_SGI_STRING </b></font></td>
<td><font face="Arial, Helvetica" size="2">Forces use of SGI string
even if you share namespace <b>std</b>:: with native C++ library
and use new <<b>iostream</b>>. IMPORTANT: DO NOT use SGI
<<b>string</b>> with native <<b>iostream</b>> unless
you <a href="vendor_interface.html#option_1">recompile</a>
standard C++ runtime library with STLport installed, or (better)
define <a href="vendor_interface.html#option_2">_STLP_USE_OWN_NAMESPACE</a>
</font></td>
</tr>
<tr>
<td><font size="1" face="Arial, Helvetica"><b>_STLP_NATIVE_INCLUDE_PATH
</b></font></td>
<td><font face="Arial, Helvetica" size="2">The path where native
compiler headers are located. STLport uses this information to
import <b>std</b>:: names into <b>_STL</b>:: namespace. Default
is <b>../include</b>. Hint : never install STLport headers in the
directory that ends with <b>include</b>. </font></td>
</tr>
<tr>
<td><font size="1" face="Arial, Helvetica"><b>_STLP_DEBUG </b></font></td>
<td><font face="Arial, Helvetica" size="2">Turns the <a href="debug_mode.html">Debug
Mode</a> on. That gets you checked iterators and ranges.
Thread-safe. </font></td>
</tr>
<tr>
<td><font size="1" face="Arial, Helvetica"><b>_STLP_USE_SYSTEM_ASSERT
</b></font></td>
<td><font face="Arial, Helvetica" size="2">use the system-defined
assert instead of fprintf to stderr </font></td>
</tr>
<tr>
<td><font size="1" face="Arial, Helvetica"><b>_STLP_DEBUG_MESSAGE </b></font></td>
<td><font face="Arial, Helvetica" size="2">Uncomment this to force
all failed assertions to be directed through a user-defined global
function: void __stl_debug_message(const char * format_str, ...).
This allows you to take control of assertions for debugging
purposes. Note : If you set this macro, you must supply <b>__stl_debug_message</b> function definition somewhere. </font></td>
</tr>
<tr>
<td><font size="1" face="Arial, Helvetica"><b>_STLP_DEBUG_TERMINATE </b></font></td>
<td><font face="Arial, Helvetica" size="2">Uncomment this to force
all failed assertions to be executed through user-defined global function: void __stl_debug_terminate(void). This allows you to take control of assertion behaviour for debugging purposes. Default routine throws unique exception if _STLP_NO_DEBUG_EXCEPTIONS is not set, calls abort() otherwise. <br>Note : If you set this macro, you must supply __stl_debug_terminate function definition somewhere.
</font></td>
</tr>
<tr>
<td><font size="1" face="Arial, Helvetica"><b>_STLP_NO_DEBUG_EXCEPTIONS </b></font></td>
<td><font face="Arial, Helvetica" size="2"> Comment this out to enable throwing unique exceptions from default __stl_debug_terminate() instead of calling abort(). </font></td>
</tr>
<tr>
<td><font size="1" face="Arial, Helvetica"><b>_STLP_NO_EXCEPTIONS </b></font></td>
<td><font face="Arial, Helvetica" size="2">Disables exception
handling code. </font></td>
</tr>
<tr>
<td><font size="1" face="Arial, Helvetica"><b>_STLP_NO_NAMESPACES </b></font></td>
<td><font face="Arial, Helvetica" size="2">Puts STLport into global
namespace, even if the compiler supports namespaces. </font></td>
</tr>
<tr>
<td><font size="1" face="Arial, Helvetica"><b>_STLP_NO_RELOPS_NAMESPACE
</b></font></td>
<td><font face="Arial, Helvetica" size="2">if defined, don't put the
relational operators in namespace <b>std::rel_ops</b>. </font></td>
</tr>
<tr>
<td><font size="1" face="Arial, Helvetica"><b>_REENTRANT </b></font></td>
<td><font face="Arial, Helvetica" size="2">Define this if your
project is multithreaded. STLport uses MT-safe allocator support
then. </font></td>
</tr>
<tr>
<td><font size="1" face="Arial, Helvetica"><b>_NOTHREADS </b></font></td>
<td><font face="Arial, Helvetica" size="2">If defined, STLport don't
use any multithreading support. </font></td>
</tr>
<tr>
<td><font size="1" face="Arial, Helvetica"><b>_STLP_NO_NEW_C_HEADERS</b></font></td>
<td><font face="Arial, Helvetica" size="2">If defined, STLport don't
use native new-style C headers even if they are available. </font></td>
</tr>
<tr>
<td><font size="1" face="Arial, Helvetica"><b>_STLP_USE_RAW_SGI_ALLOCATORS
</b></font></td>
<td><font face="Arial, Helvetica" size="2">Force STLport to use
older SGI-style allocators as default ones for containers, instead
of standard-conforming <b>allocator</b><>. </font></td>
</tr>
<tr>
<td><font size="1" face="Arial, Helvetica"><b>_STLP_USE_MALLOC </b></font></td>
<td><font face="Arial, Helvetica" size="2">This makes <b>allocator</b><>
to do plain <b>malloc()</b> calls instead of using SGI optimized
node allocator engine. </font></td>
</tr>
<tr>
<td><font size="1" face="Arial, Helvetica"><b>_STLP_USE_NEWALLOC </b></font></td>
<td><font face="Arial, Helvetica" size="2">This makes <b>allocator</b><>
to do plain <b>new()</b> calls instead of using SGI optimized node
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -