gcc 3 and the iostream debacle

[prev] [thread] [next] [lurker] [Date index for 2005/08/31]

From: Simon Wistow
Subject: gcc 3 and the iostream debacle
Date: 10:31 on 31 Aug 2005
There may be plenty more of this coming so beware.

I need to recompile a bunch of Maya 6.0 plugins for Maya 7.0. Maya 6.0 
was compield with gcc3.3.2 and 7.0 was compiled with 3.3.4

We irregulalrly have to compile against stuff for 2.9.6 as well and it 
is never a starightforward recompile, esepcially when it comes to 
iostream.

Is it 

    #include <iostream>

or

    #include <iostream.h>

the iostream.h is supposed to be a backwards compatability shim but
sometimes give deprecation warnings and sometimes does. Sometimes I have
to compile with -DAW_IOSTREAM_NEW and sometimes _BACKWARD_IOSTREAM_H. I
found a new one today which was -DREQUIRE_IOSTREAM. 

Maybe I have to put

    using namespace std;

But then again, maybe not. Sometimes i just have to prefix every cout
and cerr with std::. Although not always.

To solve a problem I've been getting with these kinds of errors

/software/gcc/3.3.4/linux.fedora1.i386/include/c++/3.3.4/backward/iostream.h:34: 
error: `
   iostream' is already declared in this scope
/software/gcc/3.3.4/linux.fedora1.i386/include/c++/3.3.4/backward/iostream.h:34: 
error: using
   declaration `iostream' introduced ambiguous type `iostream'


I had to copy backward/iostream.h to ./ although shoving a 

-I/software/gcc/3.3.4/linux.fedora1.i386/include/c++/3.3.4/backward/

caused even more errors.

Sure, there's probably something fundamentally broken with the Makefiles 
but I'll *guarantee* that the brokeness is the result of a hack put in 
there to work around the last incompatible change. 

It's a fricking compiler FFS - take C code, spit out object code. Since
this retarded family of languages makes me care about header files
anyway why make everything else so fucking difficult. And what is it
about the ADHD malcontents who produce 90% of software that means that
given a relatively conceptually simple task (read mail, display a web
page, compile a .c(pp) file) that they feel the need to strap on
complications and gotchas like a vengeful dominatrix strapping on a
veiny beknobbed dildo in order to punitively claim your manginity for
crimes unspecified and unspeakable.

I shall dig out a .sig from that last time I went through this flavour
of rigaramole. Aaaah, there it is.

Simon

-- 
a compiler chain ate my soul

Generated at 13:00 on 06 Sep 2005 by mariachi 0.52