From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,66ae69e4f2ef51b0,start X-Google-Attributes: gidfee84,public From: carlson@kikkin.zko.dec.com (Tom Carlson) Subject: Re: Using Template in DEC C++ Compiler Date: 1996/03/11 Message-ID: <4i22r2$ae8@zk2nws.zko.dec.com>#1/1 X-Deja-AN: 142718697 distribution: world references: <4hts9j$msm@nntp.Stanford.EDU> organization: Digital Equipment Corporation reply-to: carlson@kikkin.zko.dec.com (Tom Carlson) newsgroups: comp.unix.osf.osf1 In article <4hts9j$msm@nntp.Stanford.EDU>, Joshua Wai Ho Hui 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 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