From: Endlisnis 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 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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::f ()' and `g(A)'. To fix > these errors, add the lines > > template class A; > template void g (A); > > 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