FORTEC++, update 1: libCstd is not for compat mode

FORTEC++, update 1: libCstd is not for compat mode

Post by nigeri.. » Sat, 20 Jan 2001 00:54:36



I am stuck on linking, due to basic_streambuf, ios_base and
_Filebuf_base. I am compiling in compat=4 mode, with the Forte update 1
compiler.

Is there an equivalent static lib I can use, to make my program link? I
need defined function sof the three clases mentioned above, or rather,
their elimination from my build.

Regards,

Ade

Sent via Deja.com
http://www.deja.com/

 
 
 

FORTEC++, update 1: libCstd is not for compat mode

Post by Thomas Deh » Sat, 20 Jan 2001 04:23:17



> I am stuck on linking, due to basic_streambuf, ios_base and
> _Filebuf_base. I am compiling in compat=4 mode, with the Forte update 1
> compiler.

> Is there an equivalent static lib I can use, to make my program link? I
> need defined function sof the three clases mentioned above, or rather,
> their elimination from my build.

*Yikes*
The error message is absolutely correct.

-compat=4 is ARM standard C++, which all in all
has "only" a few thousand differences to ANSI/ISO C++
(-compat=5), and uses
a significantly different ABI. I strongly recommend that you
immediately discard the idea of using the libCstd (i.e. some
ANSI/ISO standard C++) together with code
compiled with -compat=4. See also Sun's C++
migration guide.

You will not be able to get this mix
to work except under extremely restricted circumstances
such as
- pure C interface between ARM code and ANSI/ISO code,
- no C++ objects/types are allowed to be visible in the other part,
  much less passed between the two parts.
- no cin, cout, cerr, and clog anywhere
- exceptions only either in the ARM or the ANSI/ISO part,
  and then you need a specific order for the libC and the
  libCrun at link time.

If you get your program to link the way you want, it won't run
correctly, as symbols will be resolved incorrectly,
and some required global structures will be missing.
You need to migrate your code to ANSI/ISO
C++ completely, especially recompile all
libraries with -compat=5, plus the necessary
code changes, or stick with the ARM standard.

Other combinations which will inevitably
fail for similar reasons: g++ and Sun's C++ compiler.
Libraries compiled with an old g++ like 2.72, and
a g++ which supports ANSI/ISO C++, like 2.95.2

C++ is not C, you cannot mix code created by
different C++ compilers, as their is no common
C++ ABI (yet).

Thomas

 
 
 

FORTEC++, update 1: libCstd is not for compat mode

Post by Roland Main » Sat, 20 Jan 2001 12:26:46



> C++ is not C, you cannot mix code created by
> different C++ compilers, as their is no common
> C++ ABI (yet).

Will this change some day in the near future ?

----

Bye,
Roland

--
  __ .  . __


  /O /==\ O\  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
 (;O/ \/ \O;) TEL +49 641 99-41370 FAX +49 641 99-41359

 
 
 

FORTEC++, update 1: libCstd is not for compat mode

Post by Thomas Deh » Sat, 20 Jan 2001 19:41:34




> > C++ is not C, you cannot mix code created by
> > different C++ compilers, as their is no common
> > C++ ABI (yet).

> Will this change some day in the near future ?

There are ongoing efforts to define
a common C++ ABI. AFAIK some basics have
already been laid down by SGI, Sun, and a few
others. When I remember how long it took
until we finally got some C++ standard at all, I expect
that it takes a few more years until some common ABI
has been defined and then subsequently implemented
by at least a few C++ compiler vendors. We also have
to take into account that an ABI change implies that
libraries built with the "old" compilers will have to
be recompiled. Finally, with C++ most development
teams use at least some libraries which have been
provided by third party software vendors who
sometimes are notoriously late in supporting
a new compiler release.

Thomas

 
 
 

1. Problem with compiling STL using program with Forte C++ 6 update 1 in compat=4 mode

 I try to compile SGI STL using program with Forte C++ 6 update 1 and I
get an errror:
ld -L/opt/SUNWspro/WS6U1/lib -liostream test.o -o test
Undefined first referenced
  symbol in file __0oNIostream_initctv test.o __0oNIostream_initdtv
test.o

 Iostream_init - declared as a static class in CC4/iostream.h,
but nm libiostream.a produce
 __1cNIostream_init2T6M_v_
 __1cNIostream_init2t6M_v_
and program can't link.
What's wrong? Thank you for any comments

PS: Possible it's not right conference to post such kind of messages,
so please advise me what conference should I use?

2. printing with epson 740

3. I am in text mode, what browser am I running....

4. apache1.1.1 and mod_auth_msql

5. Linker error -> "libCstd.so.1: version `SUNW_1.1.1' does not exist"

6. USB Hard Drive (update)

7. metamail & solaris 2.3 (compat mode)

8. MASTER BOOT RECORD (OS/2 and linux)

9. unknown compat mode

10. v4l: v4l1-compat update

11. SunOS Oracle in binary compat mode on Solaris

12. v4l: #2 - v4l1-compat update

13. NIS Slow when used in compat mode