Regression? HPUX/OS X linker problems (was: Static variables in templates}

John David Anglin dave@hiauly1.hia.nrc.ca
Mon Jun 3 21:25:00 GMT 2002


I know very little about c++ but I believe that explicit template
instantiation is needed on systems that use comdat linkage (e.g., hpux).
The program will link and run ok if you add

  template class foo<int>;

after the template definition.  Hope this helps.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)



More information about the Gcc mailing list