This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Problems with c++ (gcc 2.95.3) on Sys V R4.0
- From: Joe Buck <jbuck at synopsys dot COM>
- To: detlef dot scholz at siemens dot com (Detlef Scholz)
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 3 Jan 2002 10:31:35 -0800 (PST)
- Subject: Re: Problems with c++ (gcc 2.95.3) on Sys V R4.0
> 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.