C++ issues on RHEL3/FC-1

Matthew Saltzman mjs at ces.clemson.edu
Thu Apr 8 14:20:31 UTC 2004


On Thu, 8 Apr 2004, Greg Hosler wrote:

> Hi All,
>
> I've got a large C++ application that compiles/runs just fine on RH7.3 - I'm in
> the process of porting it to RHEL3, and I am having some issues.
>
> My program has some usage of iostreams / fstream / etc C++ constructs.
>
> Some of the questions I have come across are:
>
>         - I noticed that there are 2 sets of C++ header files.
>           one is "compat-libstdc++-devel-7.3-2.96.123", and the
>           other is "libstdc++-devel-3.2.3-24"
>
>           Is there any rule of thumb as to which set of header files I should
>           use ?

The compat headers are designed to be used with the compat-gcc-c++
package, and they are intended for programs compiled with g++296.  The
others are for the default g++, which is 3.3.2.

>
>         - It seems that by default, libstdc++-devel-3.2.3-24 is being used.
>
>           As I have a lot of pre ISO C99 constructs, this set of header files
>           seems to be giving me fits. If I use -I /usr/lib/g++-3, most of my
>           compilation errors go away (but leave me w/ link errors). Question
>           is there a non-default c++ library that I need to specify ?

Use g++296 as your compiler instead of g++.

>
>         - What are the implications, limitations, issues, with linking together
>           object files created with -I /usr/lib/g++-3, and without (i.e. with
>           "standard" g++ header files. i.e. should this work ? Is this known to
>           not work ? etc.

C++ ABIs have been changing a lot over the recent history of the compiler.
I think they are stable going forward now, but for older versions, the
entire app must be compiled and linked with the same generation of
compiler and linker.

>
> any thoughts, or tips (or pointers) would be much appreciated.
>
> thanks you, and best regards,
>
> -Greg Hosler
>
> +---------------------------------------------------------------------+
>    You can release software that's good, software that's inexpensive, or
>    software that's available on time.  You can usually release software
>    that has 2 of these 3 attributes -- but not all 3.
> | Greg Hosler                                   greg at hosler.per.sg    |
> +---------------------------------------------------------------------+
>
>
>
>

-- 
		Matthew Saltzman

Clemson University Math Sciences
mjs AT clemson DOT edu
http://www.math.clemson.edu/~mjs





More information about the redhat-list mailing list