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]

Re: Undefined reference to static member in templated class


>>>>> 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


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