🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: gnu.g++.lib.bug
2 messages
2 total messages Started by Per Sigmond Fri, 14 Aug 1992 06:31
Linker error on HP with libg++-2.2
#258
Author: Per Sigmond
Date: Fri, 14 Aug 1992 06:31
19 lines
874 bytes
The loader cannot find the symbol _vt.filebuf. Error message:

	gcc -o tFile tFile.o ../../libg++.a
	ld: Unsatisfied symbols:
   	_vt.filebuf (data)

I use hppa with hpux 8.05 and gcc-2.2.2
The library compiler without errors or warnings (after some pathing og .h-files).

What's wrong?

-- 
Per Sigmond
Agderforskning Teknologi
Televeien 1
4890 Grimstad
Norway

Internet: Per.Sigmond@teknologi.agderforskning.no
Re: Linker error on HP with libg++-2.2
#261
Author: Roger Sheldon - AISS
Date: Sun, 16 Aug 1992 23:33
60 lines
2795 bytes
In article <1992Aug14.063108.21613@ulrik.uio.no> per@teknologi.agderforskning.NO (Per Sigmond) writes:
>The loader cannot find the symbol _vt.filebuf. Error message:
>
>	gcc -o tFile tFile.o ../../libg++.a
>	ld: Unsatisfied symbols:
>   	_vt.filebuf (data)
>

I'm having a similar problem with gcc 2.1 and libg++ 2.0 under ISC 3.0
(a 386 Unix).

I successfully compiled libg++, but when I try to compile
a simple program like:
----
#include <iostream.h>
int main() { cout << "hello"; }
----
I get the following:

% g++ -v hello.c
Reading specs from /usr/local/lib/gcc-lib/i386-isc/2.1/specs
gcc version 2.1
 /usr/local/lib/gcc-lib/i386-isc/2.1/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GN
UG__=2 -D__cplusplus -Dunix -Di386 -D__unix__ -D__i386__ -D__unix -D__i386 hello
.c /usr/tmp/cca03181.i
GNU CPP version 2.1 (80386, ATT syntax)
 /usr/local/lib/gcc-lib/i386-isc/2.1/cc1plus /usr/tmp/cca03181.i -quiet -dumpbas
e hello.cc -version -o /usr/tmp/cca03181.s
GNU C++ version 2.1 (80386, ATT syntax) compiled by GNU C version 2.1.
 as -o hello.o /usr/tmp/cca03181.s
 ld /lib/crt1.o /usr/local/lib/gcc-lib/i386-isc/2.1/crtbegin.o -L/usr/local/lib/
gcc-lib/i386-isc/2.1/ -L/usr/local/lib/ hello.o -lg++ -lgcc -lc -lg -lgcc /usr/l
ocal/lib/gcc-lib/i386-isc/2.1/crtend.o /lib/crtn.o
undefined                       first referenced
 symbol                             in file
__vtbl__7filebuf                    /usr/local/lib/gcc-lib/i386-isc/2.1//libg++.
a
ld fatal: Symbol referencing errors. No output written to a.out



The problem is in iostream/stdstrbufs.C.  Here's an excerpt from
that file describing the problem:

-----
// To avoid problems depending on constructor order (and for
// efficiency) the standard streambufs (and streams) are
// constructed statically using C-style '{ ... }' initializers.
// Since you're not allowed to do this for structs that
// have virtuals, we define fake streambuf and stream classes
// that don't have any C++-isms, and initialize those.
// To initialize the vtable field of the standard filebufs,
// we use the expression 'vt_filebuf' which must evaluate to
// (the address of) the virtual function table for the
// filebuf class.
----

Thanks to anyone who can help us with this linking problem.

Roger
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads