delorie.com/archives/browse.cgi | search |
From: | Endlisnis <s257m AT unb DOT ca> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: An Answer to the Problem with Template Class |
Date: | Wed, 30 Sep 1998 18:08:12 -0300 |
Organization: | BrunNet |
Lines: | 23 |
Message-ID: | <36129DBC.65339754@unb.ca> |
References: | <360B4190 DOT 1C2DD19F AT ohriki DOT t DOT u-tokyo DOT ac DOT jp> <360B5C8C DOT 62C48CD3 AT ohriki DOT t DOT u-tokyo DOT ac DOT jp> |
NNTP-Posting-Host: | usr1fton22.brunnet.net |
Mime-Version: | 1.0 |
X-Mailer: | Mozilla 4.04 [en] (Win95; U) |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Shue-Cheng CHEN wrote: > compiling everything with g++ main.cc templates.cc will result in > undefined symbol errors for `A<int>::f ()' and `g(A<int>)'. To fix > these errors, add the lines > > template class A<int>; > template void g (A<int>); > > to the bottom of `templates.cc' and recompile. Note that this will allocate space for those objects in global memory. Also note that this requires modifying the library for every new data-type used. -- (\/) Endlisnis (\/) s257m AT unb DOT ca Endlisnis AT GeoCities DOT com Endlisnis AT BrunNet DOT Net
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |