From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Edelsohn To: Arun Saini Cc: gcc@gcc.gnu.org Subject: Re: Undefined reference to static member in templated class Date: Wed, 18 Jul 2001 12:25:00 -0000 Message-id: <200107181925.PAA20730@makai.watson.ibm.com> References: <20010718164254.68869.qmail@web10506.mail.yahoo.com> X-SW-Source: 2001-07/msg01292.html >>>>> Arun Saini writes: Arun> I am using gcc-2.95.3 on AIX 4.3.3 / RS/6000. I am enclosing here a small Arun> piece of code that compiled and executed correctly on gcc-3.0 on a Linux Arun> system. It however fails on the AIX system. GCC has known problems with templates on AIX because GCC does not have a very advanced template generation facility and relies on WEAK symbols to clean up after it. AIX does not provide WEAK symbols. For AIX, one needs to use -fno-implicit-templates option for GCC and explicitly instantiate the necessary templates in the code. David