This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
using templates in shared library
- To: egcs at egcs dot cygnus dot com
- Subject: using templates in shared library
- From: Kasper Peeters <K dot Peeters at damtp dot cam dot ac dot uk>
- Date: Tue, 8 Dec 1998 10:35:10 +0000 (GMT)
Sorry for asking this question here, but I wasn't able to find
appropriate documentation anywhere else (is there an up to date egcs
manual on the web somewhere?)
(this is all using egcs-1.1 on linux/ix86 with binutils 2.9.1)
I have a shared library which contains instances of my template
classes; 'nm --dynamic --defined' shows them as W, weak symbols. When
I use these template classes in a second library and then link with
the first one, the second library _still_ contains instances of these
templates too! (ie. nm shows exactly the same 'W' symbols).
Is there a way to tell the linker not to bother and use the instances
in the first library instead? Or am I misinterpreting my nm output?
(it's of course only a diskspace problem, but still).
Please CC to me; I'm not on this list.
Kasper