help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Shared library error


From: Terry
Subject: RE: Shared library error
Date: Tue, 28 Jun 2005 08:38:15 -0400

Ok, I found the problem which doesn't exist on any other platform for shared
libs.  It seems that I need to use the

-Wl,-whole-archive

flag to g++ when linking the .so.  For some reason the linker on Linux
doesn't pick up all the symbols unless you force it to do so.  The
non-existent default constructor threw me off as it is not declared and via
the standard should not be generated as there are two other constructors.
Interesting.  Of course, this may not be news to anyone, but I am new to
Linux.  The makefiles that I am using work on windows, aix, and sun with no
problem. Only on Linux do I have to do force this feature. Also, the
executable (server) version of this program on Linux using the same makefile
without '-shared' links and works perfectly without this flag.  If someone
could shed further light on creation of shared libs under Linux, I would be
obliged.

Thanks to everyone who replied for their help.

terry


-----Original Message-----
From: help-gplusplus-bounces+sungard=ameritech.net@gnu.org
[mailto:help-gplusplus-bounces+sungard=ameritech.net@gnu.org]On Behalf
Of Paul Pluzhnikov
Sent: Monday, June 27, 2005 8:33 PM
To: help-gplusplus@gnu.org
Subject: Re: Shared library error


"Terry" <sungard@ameritech.net> writes:

> /usr/lib/ems/libJavaReportFactory.so: undefined symbol:
_ZTV13ArcOpcTextCmd
>
> If I look at the shared library with nm, it shows that the symbol is, in
> fact, undefined.  This symbol corresponds to a default constructor which
is
> not declared or referenced

You are incorrect: if that symbol shows up in nm output, it *is*
referenced. You need to find out which object (from the set that
you link into libJavaReportFactory.so) refereces that symbol and why.

Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
_______________________________________________
Help-gplusplus mailing list
Help-gplusplus@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gplusplus





reply via email to

[Prev in Thread] Current Thread [Next in Thread]