NS/releases/3.03/source/stlport/doc/README.VC++.html
tankefugl 54a4ac5469 o Branched from 3.02
git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@85 67975925-1194-0748-b3d5-c16f83f1a3a1
2005-04-26 15:38:32 +00:00

75 lines
No EOL
6.3 KiB
HTML

<html><head><META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>STLport: Note For Visual C++ Users</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="http://www.stlport.com"><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">Note For Visual C++ Users</span>
<hr>
<h2>Known problems</h2>
<h4>Compiling</h4>
<ul>
<li>If your program is multi-threaded, make sure you defined macro <b><tt>_REENTRANT
</tt></b>to enable proper synchronization (if you are <i>using SGI
node allocator. If you are using new_alloc or malloc_alloc, you
won't need that)</i>.</li>
<li>You may encounter problems using&nbsp; <b><tt>&lt;iostream&gt; </tt></b>in
mix with SGI STL <b><tt>&lt;string&gt;, &lt;stdexcept&gt; </tt></b>without
defining <b>_STLP_USE_OWN_NAMESPACE.</b>&nbsp; Using&nbsp; <b>_STLP_USE_OWN_NAMESPACE&nbsp;
</b>is the most safe way to cooperate with new I/O<br>
library and is definitely recommended unless you recompile the whole
C++ std library with STLport installed.</li>
<li><b><tt>_STLP_USE_EXCEPTIONS</tt></b> is being defined
automatically if the compiler defined <b><tt>_CPPUNWIND</tt></b>
macro ("<b><tt>/GX</tt></b>" option). So you should not
worry about it.</li>
<li>There were reports that Visual C++ 4.0 have problems with
namespaces in certain cases. Due to that, <b><tt>_STLP_NO_NAMESPACES</tt></b>&nbsp;
defined for it in <b>&lt;stlcomp.h&gt;</b>.</li>
<li>You may encounter problems with too long symbols when compiling
with debug information. To handle this, try defining <b><tt>_STLP_USE_ABBREVS</tt></b>
in <tt>stlcomp.h</tt>.</li>
<li>You may experience problems with default SGI node allocator. I had
no such problems, though. Default node allocator is quite fast, so I
wouldn't recommend disabling it without serious reason. However, if
it causes problems, define <b><tt>_STLP_USE_MALLOC</tt></b> or <b><tt>_STLP_USE_NEWALLOC</tt></b>
to get bare malloc()-based or new()-based default allocator.</li>
<li>If your program is multi-threaded, make sure you defined macro <b><tt>_REENTRANT
</tt></b>to enable proper synchronization.</li>
<li><b>[ VC++ 4.2 and higher] </b>This version allows use of new-style
<b>&lt;iostream&gt;, &lt;string&gt;</b> with STLport , as well as
the old-style &lt;iostream.h&gt; . The default is new &lt;iostream&gt;
usage.</li>
<br>
If you want to use old-style <b>&lt;iostream.h&gt;</b> in your
project:
<ul>
<li>define macro <b>_STLP_NO_NEW_IOSTREAMS</b> in <b>&lt;stl_user_config.h&gt;</b>
or at the command line.</li>
</ul>
If you are going to use new-style <b>&lt;iostream&gt;</b> without
defining _STLP_USE_OWN_NAMESPACE:
<ul>
<li>You may have to edit relative (or set full) path to VC++&nbsp;
native headers<b><tt> </tt></b>in &lt;stl_user_config.h&gt;. Using
native versions is necessary to avoid clashes with compiled code
in C++ runtime library.</li>
<li>In the whole project, use coherent set of headers : <b>all
new-style.</b></li>
<br>
<b>&nbsp;</b>
</ul>
<li>You may also try <a href="http://www.sirius.com/~ouchida">SGI STL
adapted for MSVC++ 5.0 only,</a> by Wayne Ouchida. (Note : looks
like it's out of date and&nbsp; discontinued. It doesn't provide
debug support and other extensions of this adaptation).</li>
</ul>
<hr>
<h2>Migration notes</h2>
You should experience no other problems migrating from VC++ STL to SGI
STL. Default <b><tt>allocator&lt;T&gt;</tt></b> in this adaptation is
fully functional.
<p>&nbsp;</p>
<hr>
<h4>Versions prior to 4.0</h4>
Visual C++ older than 4.0 won't compile STL. You have to upgrade.
<p>&nbsp;</p>
<hr>
</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="20" width="50"><br><a href="index.html">Table of Contents</a><br></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="40" width="80"><br><img src="images/black.gif" border="0" height="1" 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"><img src="images/black.gif" border="0" height="1" 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"><img src="images/trans.gif" border="0" height="5" width="50"><br><span class="copyright">Copyright 2001 by STLport</span><br><img src="images/trans.gif" border="0" height="50" width="80"></td></tr></table></body></html>