For some non-Unix platforms, the latest port of gcc may be an earlier version (2.4.5, say). You'll need to use a version of libg++ that has the same first two digits as the compiler version, e.g. use libg++ 2.4 with gcc version 2.4.5.
The latest "1.x" version of gcc is 1.42, and the latest "1.x" version of g++ is 1.42.0. While gcc 1.42 is quite usable for C programs, I recommend against using g++ 1.x except in special circumstances.