Organization: Silicon Graphics, Inc. Mountain View, CA
Lines: 65
NNTP-Posting-Host: owl.asd.sgi.com
In article <C1Grqz.n4z@dcs.ed.ac.uk>, gordonc@epcc.ed.ac.uk writes:
> In article <1k1b9mINN8a6@fido.asd.sgi.com>, walker@owl.asd.sgi.com (Christopher Walker) writes:
> >
> > In article <C1DHGr.B00@dcs.ed.ac.uk>, gordonc@epcc.ed.ac.uk writes:
> > > Sorry if this has been asked before, but can I use g++ (V2.0) to compile
> > > ImageVision C++ progs, and if so, which options should I use ??
> > >
> > > Any help appreciated,
> >
> > We've never tried.. but I strongly doubt that SGI's C++ and gnu's C++ are
> > compatible. Maybe someone with more experience with g++ would know. I suspect
> > that the IL would need to be recompiled with g++ and there isn't much likelihood
> > of SGI supporting that.. sorry.
> >
>
> .....ermmm, isn't the language specification for C++ fairly strict? If I were to take pieces of C code from my SGI and attempt to compile them elsewhere, I'd like to think that I wouldn't experience too much trouble :-) (also,for example, I can compile GL programs with gcc)
>
IL ports just fine to the other platforms we've tried. That's not the issue.
The problem is in how the compilers implement various tricks..
> Incidentally, the trouble is in the linking stage. With the options, -traditional-cpp and -x c++, all is OK until link, when I get :
>
> gcc -x c++ -traditional-cpp -o imgcat imgcat.c++
>
Like name mangling.. the names below show me that g++ mangles differently than
ATT's cfront. I'm sure there are deeper problems like the layout of vtbl's and
other such goodies.. in short I'd give up while your ahead :-)
C++ just isn't as interoperable as you might like because of these little
hacks that have been used to fool the linker (which knows nothing about