Problems with c++ (gcc 2.95.3) on Sys V R4.0
Joe Buck
jbuck@synopsys.COM
Thu Jan 3 10:31:00 GMT 2002
> i try to get gcc 2.95.3 and only c++ to work on an old Unix System V Rel
> 4.0.
>
> the c compiler works fine, and c++ is build ok. But when i try to build any
> c++ program,
> the linking fails (binutils 2.10.1) with
> /usr/lib/gcc-lib/i386-pc-sysv4.0/2.95.3/libstdc++.so: undefined reference to
> `open(char const *, int,...)'
Some source file is invoking "open" without a prototype of the "open"
function in scope that is marked as extern "C". I don't know why this
occurs. It might be a bug in "fixincludes" for that platform, meaning
that a header doesn't get wrapped correctly.
You could try to isolate the individual .o file with the bad symbol
reference to figure out why it occurs, then add the appropriate prototype
to that file:
extern "C" int open(const char*, int, ...);
But this might only get you to the next bug.
More information about the Gcc
mailing list