Subject: GCC problem?
To: None <current-users@NetBSD.ORG>
From: Thomas Seidmann <seidmann@dcs.elf.stuba.sk>
List: current-users
Date: 04/07/1998 14:47:00
Hello,

I'm using NetBSD 1.3 and recently while trying to get omniORB to run I
observed strange GCC behaviour. Take this small (nonsense) program

#include <iostream.h>
#include <iomanip.h>

int main()
{
  cerr << "BlaBla\n";
  cerr << hex;
  cerr << setfill('0') << setw(2);
  cerr << dec;
}

It compiles correctly, but the linker spits out a couple of unresolved
symbols:

/var/tmp/cc17753a1.o: Undefined symbol `_hex__FR3ios' referenced from
text segment
/var/tmp/cc17753a1.o: Undefined symbol `_hex__FR3ios' referenced from
text segment
/var/tmp/cc17753a1.o: Undefined symbol `_setfill__Fi' referenced from
text segment
/var/tmp/cc17753a1.o: Undefined symbol `_setw__Fi' referenced from text
segment
/var/tmp/cc17753a1.o: Undefined symbol `_dec__FR3ios' referenced from
text segment
/var/tmp/cc17753a1.o: Undefined symbol `_dec__FR3ios' referenced from
text segment

Common to dec, hex, setfill and setw is that they are all inline
functions/methods. The gcc version is 2.7.2.2+myc1. I checked the same
program under both FreeBSD with gcc-2.7.2.1 and Linux with gcc-2.7.2.3,
and on both platforms it compiles, links and runs correctly. Could
anybody help me with this? Thank you.

Regards,
Thomas

-- 
==========================================================
Dipl.-Ing. Thomas Seidmann
Department of Computer Science and Engineering
Slovak University of Technology in Bratislava
mailto:seidmann@dcs.elf.stuba.sk Tel +421.7.60291153
==========================================================