Article View: gnu.g++.help
Article #855Re: template link error using g++2.7.2
From: David Campbell
Date: Thu, 14 Dec 1995 23:06
Date: Thu, 14 Dec 1995 23:06
51 lines
1878 bytes
1878 bytes
On 12 Dec 1995, Gordon Keith wrote: > On 6 Dec 95 at 17:56, Thomas FELICI wrote: > *stuff deleted* > > > > The program compiled ok with gcc 2.6.* > > what's gone wrong? > > Two solutions: > 1) apply the repo patch. > 2) add the following file to the library: > > #include "array.h" > > template class Array<Boat>; > template class Array<Change>; > template class Array<Client>; > template class Array<Client_data>; > template class Array<Clients>; > template class Array<int>; > template class Array<Transaction>; > template class List<Base_par *>; > template class List<OptsEditor *>; > template class List<Par_list *>; > > This file will instantiate the templates so the linker can find the > instances. > > Hope this helps. > > > -- gordon_kei@antdiv.gov.au --- gordonkeith@acslink.net.au > Gordon Keith ,-_|\ Ph: +61 02 323 452 > Programmer / \ Fax: +61 02 323 351 > Marine Science Section \_,-._/ > Australian Antarctic Division * > http://www.antdiv.gov.au http://acslink.net.au/~gordonkeith (Standard disclaimer applies) > > Good, Fast, Cheap: Choose two. I'm having a similar problem using g++ 2.7.0. Whats the "repo patch". Thanks Dave Campbell Hughes Aircraft Tucson AZ campbell@igate1.hac.com
Technical Details
Message-ID:
<Pine.LNX.3.91.951214155931.9345B-100000-100000-100000-100000@daops4.tu.hac.com>Path:
arc1-ca.pugleaf.net!daops4.tu.hac.com!daveReferences:
<9512130004.AA08698@life.ai.mit.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!daops4.tu.hac.com!dave From: David Campbell <dave@daops4.tu.hac.com> Newsgroups: gnu.g++.help,comp.lang.c++ Subject: Re: template link error using g++2.7.2 Date: Thu, 14 Dec 1995 16:06:37 -0700 Organization: Hughes Aircraft Company Message-ID: <Pine.LNX.3.91.951214155931.9345B-100000-100000-100000-100000@daops4.tu.hac.com> References: <9512130004.AA08698@life.ai.mit.edu> NNTP-Posting-Host: daops4.tu.hac.com Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII In-Reply-To: <9512130004.AA08698@life.ai.mit.edu>