* Re: Using Template in DEC C++ Compiler [not found] <4hts9j$msm@nntp.Stanford.EDU> @ 1996-03-11 5:00 ` Tom Carlson 1996-03-11 5:00 ` Tim Lucia 1 sibling, 0 replies; 2+ messages in thread From: Tom Carlson @ 1996-03-11 5:00 UTC (permalink / raw) In article <4hts9j$msm@nntp.Stanford.EDU>, Joshua Wai Ho Hui <wjhui@leland.Stanford.EDU> writes: |>Hi, |> |>I try to compile my program which has template class declaration using |>DEC C++ Compiler for DEC OSF. However, it always complaint that the functions |>are not found when doing the linking. Yes. DEC C++ V5.1 does not support template auto-instantiation. Please see the cxx man page for the -define_templates commandline switch. Alternately, you could modify your source to add #pragma define_template directives for each type of template to be instantiated. i.e., #pragma define_template sort<int> Starting DEC C++ V5.3 (currently in field-test), template auto-instantiation is supported. Tom -- Thomas Carlson, DEC C/ DEC C++ carlson@decc.enet.dec.com Digital Equipment Corporation, ZK2-3/N30 110 Spitbrook Rd, Nashua, NH 03062 ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Using Template in DEC C++ Compiler [not found] <4hts9j$msm@nntp.Stanford.EDU> 1996-03-11 5:00 ` Using Template in DEC C++ Compiler Tom Carlson @ 1996-03-11 5:00 ` Tim Lucia 1 sibling, 0 replies; 2+ messages in thread From: Tim Lucia @ 1996-03-11 5:00 UTC (permalink / raw) To: Joshua Wai Ho Hui Joshua Wai Ho Hui wrote: > > Hi, > > I try to compile my program which has template class declaration using > DEC C++ Compiler for DEC OSF. However, it always complaint that the functions > are not found when doing the linking. > > Should I need to do something extra in order to make it work? > > Joshua You need to define templates explicitly by saying #pragma define_template ..., e.g. #pragma define_template RWTPtrSlist<SymIndex> will define the template class RWTPtrSlist<SymIndex> Regards, Tim -- Timothy J. Lucia Email: mailto:lucia@zko.dec.com Digital Equipment Corporation Phone: 603.881.2615 110 Spitbrook Road ZK2-3Q08 Fax: 603.881.0120 Nashua, NH USA 03062-2698 I'd rather be cycling. ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1996-03-11 5:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <4hts9j$msm@nntp.Stanford.EDU>
1996-03-11 5:00 ` Using Template in DEC C++ Compiler Tom Carlson
1996-03-11 5:00 ` Tim Lucia
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox