The STL+ C++ library
Andy Rushton
My intention is to port the STLplus library to as many platforms as I can reasonably support. SourceForge help here by allowing access to a wide range of different platforms that I can run tests on.
There are a number of porting issues to be overcome:
One of the objectives of this library is to provide platform-independent access to operating system services that differ between platforms. The idea is to hide the implementation behind a common interface. By writing software to that interface, you automatically get portable software. At least, that is the theory.
Different CPUs have different word lengths, different byte ordering and different integer type definitions. The intention is that STLplus will work with all variations of these characteristics that I come across.
The concept of portability means portability between operating systems, not necessarily portability between compilers. However, to cater for different tastes in compilers, under Windows the library will work for either the Gnu gcc compiler or the Microsoft Visual C++ compiler.
It is also important that software will build with different versions of each compiler, because I have no control over which compiler you are using and there's a good chance that you don't either. The STLplus library should ideally work in whatever development environment you have chosen (within reason). So, STLplus works with different releases of these compilers, not just the latest one. At the time of writing STLplus builds with all versions of gcc from version 2.95 up to 3.4 and has been reported as working with version 4. It also works with Visual Studio versions 6, 7 and 8 although I only supply project files for v6.
I refer to a "platform" as a particular combination of CPU, Operating System and Compiler.
SourceForge, which hosts STLplus, used to provide a Compile Farm so that I could test STLplus on different platforms. This enabled me, for example, to fix problems with data persistence on 64-bit CPUs. Unfortunately, the Compile Farm has now been withdrawn, so I can only test the library on my Windows machine. However, I can still test against both Unix (Cygwin emulation) and Windows, and both Visual Studio (Windows native) and Gcc compilers (both Windows native and Unix emulation).
If you can confirm the library works on any other platform or compiler combination, please let me know the details - Compiler, Compiler version, OS, CPU etc.
The following table shows the platforms that STLplus has been ported to so far.
| Platform | Build | State | |||||
|---|---|---|---|---|---|---|---|
| CPU | Bits | OS | Compiler | Name | -D1 | Tested | Notes |
| Intel 686 | 32 | Windows XP | gcc 3.4.4 (Unix emulation) | CYGWIN-i686 |
|
2 November 2007 | Uses Cygwin to build a Unix-emulation program that runs on Windows |
| Intel 686 | 32 | Windows XP | gcc 3.4.4 (Windows native) | CYGMING-i686 |
_WIN32 |
2 November 2007 | Uses Cygwin to build a native Windows program |
| Intel 686 | 32 | Windows XP | gcc 3.4.5 (MinGW) | MINGW-i686 |
_WIN32 |
2 November 2007 | Uses MINGW to build a native Windows program |
| Intel 686 | 32 | Windows XP | Visual Studio, v6 | _WIN32 |
2 November 2007 | Visual Studio v6 - requires SP5 | |
| Intel 686 | 32 | Windows XP | Visual Studio, v8 | _WIN32 |
2 November 2007 | Visual Studio 2005 Express Edition | |
| Intel 686 | 32 | Debian Linux 2.4.19 | gcc 2.95.4 | LINUX-i686 |
|
21 September 2005 | |
| DEC Alpha | 64 | Debian Linux 2.2.20 | gcc 2.95.4 | LINUX-alpha |
|
17 January 2006 | |
| AMD Opteron | 64 | Red Hat Linux 2.6.9 | gcc 3.4.2 | LINUX-x86_64 |
|
21 September 2005 | |
| Sun Sparc | 32 | Solaris 5.9 | gcc 3.3.2 | SOLARIS-sun4u |
SOLARIS |
21 September 2005 | Posix build except that Sun put declarations in strange headers. |
| Intel x86 | 32 | Solaris 5.9 | gcc 3.3.2 | SOLARIS-i86pc |
SOLARIS |
8 October 2004 | Posix build except that Sun put declarations in strange headers. |
| Intel x86 | 32 | Free BSD 4.10-BETA | gcc 2.95.4 | FREEBSD-i386 |
|
9 October 2004 | |
| Intel x86 | 32 | Net BSD 2.0.2 | gcc 3.3.3 | NETBSD-i386 |
|
17 January 2006 | |
| Intel x86 | 32 | Open BSD 3.8 | gcc 3.3.5 | OPENBSD-i386 |
|
17 January 2006 | |
| Power PC | 32 | MacOS-X 10.2 | gcc 3.1 | MACOS-powerpc |
|
21 June 2006 | This is the first port to MacOS-X (OSX) and it works as a pure Posix build! |
| Power PC | 64 | Suse Linux 2.6 | gcc 3.3.3 | LINUX-ppc64 |
|
17 January 2006 | IBM OpenPower Server |
Note 1: The -D directive is a C macro that selects between different implementations of code for different platforms. For example, a Windows application will use different system calls to a Unix application. The correct directive for the platform must be defined for the STLplus library to build on the target platform. Typically this is set as an option to the compiler - for example with the gcc compiler you would specify "gcc -DSOLARIS" when building on Solaris. The _WIN32 value that selects the Windows native build is set automatically by the compilers so you don't have to do this. If no -D directive is shown, then the default build is a generic Unix build and needs no special rules. See the documentation on building the library for more on this.