This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]