cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1997/10/10/13:09:18

Message-Id: <3.0.16.19971010190518.1a77c57c@hem1.passagen.se>
Date: Fri, 10 Oct 1997 19:05:37 -0400
To: Charles Krug <charles AT pentek DOT com>
From: Peter Palotas <blizzar AT hem1 DOT passagen DOT se>
Subject: Re: Linking Template classes?
Cc: djgpp AT delorie DOT com
Mime-Version: 1.0

>I'll assume that you know what a template class is--I had no idea until I
>read the article in Dr. Dobbs in their last C/C++ issue.

Well, I've been working a bit with templates, yes.

>Well, it's two hours later and I got it working.  By wading through info, it
>appears that the interface and implementation for template classes needs to
>be an include file.  Once I #included my .cc file, I was told to use #pragma
>interface and #pragma implementation in the appropriate sections of the
>source for the template classes. (this came up as a compiler error from gxx)

Yes, a template has to be included as far as I know, since it is created
dynamically. You can't compile a template member function and then use the
compiled version somewhere else.

>If you know how template classes are SUPPOSED to work under gxx, I'd
>appreciate knowing.  The info(as is usual) is rather vague, assuming
>experience w/ Borland or MS C++ compilers

Could you give me a bit source code maybe, because I still don't quite
understand your problem I'm afraid. What #pragmas were you told to use by
the way? (And why?)


-- Peter Palotas alias Blizzar -- blizzar AT hem1 DOT passagen DOT se --

*****************************************************
* A brief description of DJGPP:                     *
* NEVER BEFORE HAS SO FEW DONE SO MUCH FOR SO MANY! *
*****************************************************

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019