Libraries
"There's libs o' great deal, don't reinvent the wheel!"
It's hard to begin development on a building without a good foundation...the same goes for applications. Instead of cement and proper
ground leveling, we have collections of reusable code written by many talented programmers worldwide. The numbers of libraries available
now is vast - just look at SourceForge1
- and it's almost impossibly hard to find and select the right ones, regardless of how specific you get! Luckily, provided below are
excellent libraries that have been tested and proved!
Note: Some of the distributions here are quite large. Please be sure to give your web browser time to load the file. (In testing the CD, we
found that one would click, wait a couple of seconds and then click again several times thinking nothing was happening. A few seconds later several
instances of the archive browser would open!)
: located locally (on the CD).
: located on the World Wide Web
1.
|
The libraries listed below are ones in which I've had a significant input. Hence, they ably demonstrate
many of the principles and techniques espoused in Imperfect C++. I invite you to install and use them,
and to participate in their respective forums if you encounter problems, or want to offer comment or
suggestions.
|
STLSoft
Version: 1.7.1
Home Page: http://www.stlsoft.org/
License: Synesis Software Standard Source License
File: stlsoft_1_7_1-full.zip,
Size: 2048 KB
File: stlsoft_1_7_1-help.zip,
Size: 2572 KB
The philosophy of STLSoft is very simple: providing robust and lightweight STL-compliant software to
the development community. STLSoft attempst to do the near-impossible: marry STL with the UNIX principles
of Usability and Discoverability. I think it achieves this for the most part , but then I would think that,
wouldn't I? I invite you to install and use it, and let me know whether you think?
The STLSoft libraries are 100% header-only, and are divided into 8 sub-projects:
|
|
STLSoft
|
|
The main project. Contains the supporting components used by the other projects, along with a host of
provides cross-platform, technology/API-neutral classes and functions, within the namespace stlsoft.
|
|
|
ATLSTL
|
|
STL components for use with the Active Template Library, defined within the
namespace atlstl.
|
|
|
COMSTL
|
|
COM meets STL, in this high-power, low-overhead sub-project. Components
defined within the namespace comstl.
|
|
|
.netSTL
|
|
Currently small library, providing extensions for C++.NET.
Components defined within the namespace dotnetstl.
|
|
|
InetSTL
|
|
STL meets the Internet programming. This is a new sub-project
in STLSoft, currently providing STL-compatible wrappings for the WinInet API.
Components defined within the namespace inetstl.
|
|
|
MFCSTL
|
|
STL-compatibility for the Microsoft Foundation Classes. Components
defined within the namespace mfcstl.
|
|
|
UNIXSTL
|
|
STL-compatible wrappings for UNIX operating system APIs. Components
defined within the namespace unixstl.
|
|
|
WinSTL
|
|
STL-compatible wrappings for Win32 operating system APIs. Components
defined within the namespace winstl.
|
Since I was refining libraries right down to the wire of the release of the CD, there've been several changes subsequent to
the preparation of version 1.7.1, so I've included a
beta - stlsoft_icpp_beta.zip - which includes
all the changes to date. Also, please make sure you visit the STLSoft website
since version 1.8 may have been released by the time Imperfect C++ is published.
|
recls
Manufacturer: Synesis Software,
Version: 1.5.2
Home Page: http://www.recls.org/
License: Synesis Software Standard Source License
File: recls_1_5_2.zip,
Size: 921 KB
recls (recursive ls)is the exemplar project from my Positive Integration column for
C/C++ User's Journal. It is a platform-independent recursive search
library - for file-systems and, as of version 1.5.1, able to do FTP searches - written in C/C++ and
presenting a C-API.
It also includes mappings to other languages/technologies, currently including C++, COM, C#/.NET, D, Java, Ruby
and STL. recls uses the STLSoft libraries, but other than that is standalone.
Since I was refining libraries right down to the wire of the release of the CD, there've been several changes subsequent to
the preparation of version 1.5.2, so I've included a
beta - recls_icpp_beta.zip - which includes
all the changes to date. Also, please make sure you visit the recls website
since version 1.6 will have been released by the time Imperfect C++ is published.
|
OpenRJ
Manufacturer: Synesis Software,
Version: pre-1.0 beta
Home Page: http://www.openrj.org/
License: BSD
File: openrj_beta1.zip,
Size: XXXX KB
The Open-RJ project came about as the result of a need for a simple configuration file format and reader. The RJ stands for
Record Jar, as espoused by the excellent book The Art of UNIX Programming.
Essentially, the record jar format looks like the following:
%% Record terminator - in this case, the record has no fields
%% Record terminator - Record terminators are also comments
Name: The name of this simple record
%% All fields from prior delimiter comprise this record
Label: A field in the second record
Description:This is a long field so it can be split over \
multiple lines. But note that you cannot split \
record terminator lines. That's about the only \
restriction in this very free format.
%%
< . . . and so on and so on, until the end of file >
%% - the final record terminator.
This format is ridiculously easy to edit, generate and comprehend. Higher level structures can be layered over it with
relative ease.
As is my wont, I've already mapped the library to C++, Ruby and STL, and it is tested on both Linux and Win32. The
version included on the CD is the first beta, so it's not guaranteed to be perfect. Having said that, I've used the
Ruby extension to generate most of the content of this CD, and it worked perfectly. The main issue is that there's
no documentation as yet. However, there are sample data files, and samples written in C, C++ and STL which clearly
show its use.
By the time you get this CD, the library should have been released, documentation written, and other languages
mapped. I strongly suggest you visit the project home page at http://openrj.org/,
and obtain the latest version. Even better: why don't you join the project and help out?
|
Synesis Software Public Domain Source Code Library
Manufacturer: Synesis Software
Home Page: http://synesis.com.au/software/index.html#sspdscl
License: Synesis Software Standard Source License
File: sspdscl_4.18.3.2113.zip,
Size: 455 KB
This is the small segment of the Synesis Software libraries -
from which many of the other libraries listed here originally sprang - that is
publicly available. The Synesis libraries have been evolving since the
early 1990s, but have stagnated a little in the last 4-5 years as their components have been rewritten and repackaged
in these child libraries. The children've left the old girl behind now, not only technically, but
also in coding style and organisation, so don't expect to see pretty code. It's pretty ugly stuff, but it's pretty
thoroughly tested: this code is running inside several commercial programs which've run unbroken for several years.
The version of Arturius included
on the CD currently needs a few components from this library, but I intend to break that dependency by the next
release, which will probably have happened by the time the book is published. So please keep up to date with news
about Arturius at its website http://www.arturius.org/, and with news in
general on the Imperfect C++ website.
|
UNIX Emulation for Win32
Manufacturer: Synesis Software
Home Page: http://synesis.com.au/software/index.html#unixem
License: BSD
This is a small, simple, test-only quality, library that provides emulation of various UNIX APIs on the Win32
operating system. I use it for testing UNIXSTL components from within
Win32 development environments. It is not to be used for any commercial products - for that try
CygWin - but as a test-bed it's proved immensely useful over the last few years.
|
|
|
The libraries listed below are ones I've not had any significant level of involvement in. Despite that, or
perhaps because of it, they're superb, and well worth your interest.
|
Boost
Version: 1.31.0
Home Page: http://www.boost.org/
License: Boost Software License
File: boost_1_31_0.zip,
Size: 13010 KB
The Boost web site provides free peer-reviewed portable C++ source libraries. The emphasis is on libraries which work well with the C++
Standard Library. The libraries are intended to be widely useful, and are in regular use by thousands of programmers across a broad
spectrum of applications.
A further goal is to establish "existing practice" and provide reference implementations so that Boost libraries are suitable for
eventual standardization. Ten Boost libraries will be included in the C++ Standards Committee's upcoming C++ Standard Library Technical
Report as a step toward becoming part of a future C++ Standard.
Although Boost was begun by members of the C++ Standards Committee Library Working Group, participation has expanded to include
thousands programmers from the C++ community at large.
|
Cygwin
Manufacturer: Open Participation
Home Page: http://sources.cygwin.com/
License: GNU GPL and X11
Cygwin is a Linux-like environment for Windows. It consists of two parts: A DLL (cygwin1.dll) which acts as a
Linux emulation layer providing substantial Linux API functionality, and a collection of tools, which provide
Linux look and feel.
|
Pthreads-win32
Manufacturer: Open Participation
Home Page: http://sources.redhat.com/pthreads-win32/
License: GNU Lesser General Public License
The POSIX 1003.1-2001 standard defines an application programming interface (API) for writing multithreaded applications. This interface is
known more commonly as pthreads. A good number of modern operating systems include a threading library of some kind: Solaris (UI) threads,
Win32 threads, DCE threads, DECthreads, or any of the draft revisions of the pthreads standard. The trend is that most of these systems are
slowly adopting the pthreads standard API, with application developers following suit to reduce porting woes.
Win32 does not, and is unlikely to ever, support pthreads natively. This project seeks to provide a freely available and high-quality solution
to this problem
|
zlib
Manufacturer: Jean-loup Gailly & Mark Adler.
Home Page: http://www.zlib.org/
License: Zlib License
zlib is designed to be a free, general-purpose, legally unencumbered -- that is, not covered by any patents --
lossless data-compression library for use on virtually any computer hardware and operating system. The zlib data
format is itself portable across platforms. Unlike the LZW compression method used in Unix compress(1) and in the GIF
image format, the compression method currently used in zlib essentially never expands the data. (LZW can double or triple
the file size in extreme cases.) zlib's memory footprint is also independent of the input data and can be reduced, if
necessary, at some cost in compression.
|
|
|