This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

using templates in shared library



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]