Notes for SUNPro C++ Users
Common NotesFor all SUN compilers, STLport nables separate compilation with non-inline template members defined in .c file. That is supposed to help with code bloat, but does not make a big difference for SUN compilers. So, if having any problems with this mode, just turn off _STLP_LINK_TIME_INSTANTIATION switch. Installation: please note that even if you do not use STLport iostreams, you still have to go to "src" subdirectory and do "make" or at least "make prepare" to produce additional .SUNWCCh files necessary for compilation)Notes for SUNPro C++ usersKnown problemsCompilingKnown problemsBugs (Note for SUNPro C++ 4.2 or before)Note: proposed workaround is implemented for this bug for all relevant STLport code. However, please be aware of this bug because it might affect your own code. Perry R. Ross 3/12/99 pross@platinum.com
The SunPro 4.2 compiler has a serious problem handling string literals int
. Compiling
Note for SUNPro C++ 4.1 usersKnown problemsCompilingC++ 4.1 have problems recognizing types nested in template classes when parsing declarations. For example , the following construct fails (suppose STL vector is a base type for derived_vector ):derived_vector<int> years; To work around this problem completely, you should repeat those typedefs from base class that you are going to use in any way: template <class T> class derived_vector : public
vector<T> { STL code itself is now free of this problem. C++ 4.1 may also suffer from optimization bugs when using exception handling. If your application doesn't use exceptions, you'd better use -noex option along with _STLP_NO_EXCEPTIONS flag. LinkingYou may have troubles getting linker errors compiling multiple targets in one directory ( for example, running cygnus testsuite). That is a bug in handling Templates.DB dependencies. Known solutions are :a) for one-file tests, specify option -pto (one-file-mode) option to turn off database completely. Option -pts(single-file-mode) doesn't fix all problems. b) for complex projects, use separate Templates.DB directories for different targets.
Notes for SUNPro C++ 4.0.1 usersKnown problemsVersion problemsIf your CC 4.0.1 cannot compile testsuite, most likely you are using out-of date version. You should download patches for 4.0.1 (SparcCompilers WorkShop 3.0.1) from SunPro site :Solaris 2.x : http://www.sun.com/workshop/tnb/sparc2x/patch.html (SPARC/Solaris 2.x) . You should look for patches 101242-12 & 101242-14 ( 101242-12 is required to work with 101242-12). Sunos 4.1.x: http://www.sun.com/smcc/solaris-migration/cmc.products.970709/XCM/101914-14.tar.Z (SPARC/SunOS 4.1.x) http://www.sun.com/workshop/tnb/sparc1x/patch.html (SPARC/SunOS 4.1.x). Look for 101914-20. CompilingC++ 4.0.1 have problems recognizing types nested in template classes when parsing declarations. For example , the following construct fails (suppose STL vector is a base type for derived_vector ):derived_vector<int> years; To work around this problem completely, you should repeat those typedefs from base class that you are going to use in any way: template <class T> class derived_vector :
public vector<T> { More severe problems arise when given template argument's typedefs are used as template arguments for base class. The example is function adaptors from function.h . Refer to workarounds for binders & composers to see how it can be hanled ( proposed by "Martin Abernethy" <gma@paston.co.uk> ). C++ 4.01 may also suffer from optimization bugs when using exception handling. If your application doesn't use exceptions, you'd better use -noex option along with _STLP_NO_EXCEPTIONS flag. LinkingYou may still have to use explicit instantiations and/or specific template database controls for complex cases to avoid "unresolved symbol" linker errors.You may have troubles getting linker errors compiling multiple targets in one directory ( for example, running cygnus testsuite). That is a bug in handling Templates.DB dependencies. Known solutions are : a) for one-file tests, specify option -pto (one-file-mode) option to turn off database completely. Option -pts(single-file-mode) doesn't fix all problems. b) for complex projects, use separate Templates.DB directories for different targets.
Migration notesYou should experience no other problems migrating from HP STL to SGI STL.
Versions prior to 4.1For info on SUNPro C++ 4.0.1, see README.sunpro401. SUNPro C++ older than 4.0.1 won't compile STL. You have to upgrade. | |
Table of Contents | |
Copyright 2001 by STLport |