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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Paul Pluzhnikov Sent: Monday, June 27, 2005 8:33 PM To: [email protected] Subject: Re: Shared library error "Terry" <[EMAIL PROTECTED]> 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 [email protected] http://lists.gnu.org/mailman/listinfo/help-gplusplus _______________________________________________ Help-gplusplus mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-gplusplus
