Thinking in C++ Vol 2 - Practical Programming |
Prev |
Home |
Next |
Your compiler may not support all the features discussed in
this book, especially if you don t have the newest version of your compiler.
Implementing a language like C++ is a Herculean task, and you can expect that
the features will appear in pieces rather than all at once. But if you attempt
one of the examples in the book and get a lot of errors from the compiler, it s
not necessarily a bug in the code or the compiler it may simply not be
implemented in your particular compiler yet.
We used a number of compilers to test the code in this book,
in an attempt to ensure that our code conforms to the C++ Standard and will
work with as many compilers as possible. Unfortunately, not all compilers
conform to the C++ Standard, and so we have a way of excluding certain files
from building with those compilers. These exclusions are reflected in the
makefiles automatically created for the package of code for this book that you
can download from www.MindView.net. You can see the exclusion tags embedded in
the comments at the beginning of each listing, so you will know whether to
expect a particular compiler to work on that code (in a few cases, the compiler
will actually compile the code but the execution behavior is wrong, and we
exclude those as well).
Here are the tags and the compilers that they exclude from
the build:
{-dmc} Walter Bright s Digital Mars compiler for Windows,
freely downloadable at www.DigitalMars.com. This compiler is very conformant
and so you will see almost none of these tags throughout the book.
{-g++} The free Gnu C++ 3.3.1, which comes pre-installed
in most Linux packages and Macintosh OSX. It is also part of Cygwin for Windows
(see below). It is available for most other platforms from gcc.gnu.org.
{-msc} Microsoft Version 7 with Visual C++ .NET (only
comes with Visual Studio .NET; not freely downloadable).
{-bor} Borland C++ Version 6 (not the free download; this
one is more up to date).
{-edg} Edison Design Group (EDG) C++. This is the
benchmark compiler for standards conformance. This tag occurs only because of
library issues, and because we were using a complimentary copy of the EDG front
end with a complimentary library implementation from Dinkumware, Ltd. No
compile errors occurred because of the compiler alone.
{-mwcc} Metrowerks Code Warrior for Macintosh OS X. Note
that OS X comes with Gnu C++ pre-installed, as well.
If you download and unpack the code package for this book
from www.MindView.net, you ll find the makefiles to build the code for the
above compilers. We used the freely-available GNU-make, which comes with
Linux, Cygwin (a free Unix shell that runs on top of Windows; see
www.Cygwin.com), or can be installed on your platform see
www.gnu.org/software/make. (Other makes may or may not work with these
files, but are not supported.) Once you install make, if you type make
at the command line you ll get instructions on how to build the book s code for
the above compilers.
Note that the placement of these tags on the files in this
book indicates the state of the particular version of the compiler at the time
we tried it. It s possible and likely that the compiler vendor has improved the
compiler since the publication of this book. It s also possible that while
building the book with so many compilers, we may have misconfigured a
particular compiler that would otherwise have compiled the code correctly. Thus,
you should try the code yourself on your compiler, and also check the code
downloaded from www.MindView.net to see what is current.
Thinking in C++ Vol 2 - Practical Programming |
Prev |
Home |
Next |