* Re: AIX and shared libraries (missing vtable)
@ 2003-06-24 19:01 David Edelsohn
0 siblings, 0 replies; 4+ messages in thread
From: David Edelsohn @ 2003-06-24 19:01 UTC (permalink / raw)
To: Joerg.Richter; +Cc: gcc-help
AIX ld -bexpall does not export symbols with a prepended
underscore, as is specified by GCC C++ ABI. One needs to explicitly
generate an export symbol list.
David
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: AIX and shared libraries (missing vtable)
2003-06-03 13:39 ` Eljay Love-Jensen
@ 2003-06-03 20:03 ` Alexandre Oliva
0 siblings, 0 replies; 4+ messages in thread
From: Alexandre Oliva @ 2003-06-03 20:03 UTC (permalink / raw)
To: Eljay Love-Jensen; +Cc: Joerg.Richter, gcc-help
On Jun 3, 2003, Eljay Love-Jensen <eljay@adobe.com> wrote:
> It's probably having a problem with your non-standard ".o" extension
> on the shared-library you've produced called "shr.o", and then
> packaging that shared-library into an archive library (.a). Very
> unusual.
Not unusual at all if you're familiar with the several different
flavors of shared libraries supported by AIX. This happens to be
exactly the right way to create one of such flavors.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist Professional serial bug killer
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: AIX and shared libraries (missing vtable)
2003-06-03 8:52 Joerg.Richter
@ 2003-06-03 13:39 ` Eljay Love-Jensen
2003-06-03 20:03 ` Alexandre Oliva
0 siblings, 1 reply; 4+ messages in thread
From: Eljay Love-Jensen @ 2003-06-03 13:39 UTC (permalink / raw)
To: Joerg.Richter, gcc-help
Hi Joerg,
It's probably having a problem with your non-standard ".o" extension on the
shared-library you've produced called "shr.o", and then packaging that
shared-library into an archive library (.a). Very unusual.
Sincerely,
--Eljay
^ permalink raw reply [flat|nested] 4+ messages in thread
* AIX and shared libraries (missing vtable)
@ 2003-06-03 8:52 Joerg.Richter
2003-06-03 13:39 ` Eljay Love-Jensen
0 siblings, 1 reply; 4+ messages in thread
From: Joerg.Richter @ 2003-06-03 8:52 UTC (permalink / raw)
To: gcc-help
Hi,
I have problems building shared libraries on AIX.
$ g++ -v
Reading specs from
/tools/pkg/gcc/3.2.1/lib/gcc-lib/powerpc-ibm-aix5.1.0.0/3.2.1/specs
Configured with: configure --prefix=/tools/pkg/gcc/3.2.1 --with-ld=/bin/ld
--with-as=/bin/as --enable-languages=c,c++
Thread model: aix
gcc version 3.2.1
I have following reduced testcase:
----- sh.h -----
struct A
{
virtual ~A();
};
----- sh.cc -----
#include "sh.h"
A::~A()
{}
----- main.cc -----
#include "sh.h"
int main()
{
A a;
return 0;
}
----- buildscript -----
CC="/tools/pkg/gcc/3.2.1/bin/g++"
$CC -c -o sh.o sh.cc
$CC -shared -Wl,-bexpall -o shr.o sh.o
ar cruv libsh.a shr.o
ranlib libsh.a
$CC -c -o main.o main.cc
$CC -o main main.o -L. -lsh
The last command has this error messages:
ld: 0711-317 ERROR: Undefined symbol: vtable for A
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
information.
collect2: ld returned 8 exit status
The best is, that nm on the library says, that the vtable for A is in the
library
dump -Tv says that the symbol for the vtable is not in the export list of
the library. But -bexpall should have made this. I know that this is a
aix-ld option, but perhabs there is any option for g++ that i have overseen?
Can someone please help me figure out what goes wrong?
tia
Joerg Richter
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-06-24 19:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-24 19:01 AIX and shared libraries (missing vtable) David Edelsohn
-- strict thread matches above, loose matches on Subject: below --
2003-06-03 8:52 Joerg.Richter
2003-06-03 13:39 ` Eljay Love-Jensen
2003-06-03 20:03 ` Alexandre Oliva
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).