This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Regression? HPUX/OS X linker problems (was: Static variables in templates}
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: gcc at gcc dot gnu dot org
- Cc: ravi at ee dot eng dot ohio-state dot edu
- Date: Mon, 3 Jun 2002 23:29:40 -0400 (EDT)
- Subject: Re: Regression? HPUX/OS X linker problems (was: Static variables in templates}
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)