From owner-freebsd-questions Sat Apr 3 10:27:38 1999 Delivered-To: freebsd-questions@freebsd.org Received: from eddie.incantations.net (unknown [204.180.122.38]) by hub.freebsd.org (Postfix) with ESMTP id E447C14CFC for ; Sat, 3 Apr 1999 10:27:36 -0800 (PST) (envelope-from thanatos@eddie.incantations.net) Received: from localhost (thanatos@localhost) by eddie.incantations.net (8.8.8/8.8.5) with SMTP id MAA26759 for ; Sat, 3 Apr 1999 12:25:41 -0600 (CST) Date: Sat, 3 Apr 1999 12:25:41 -0600 (CST) From: Jason Hudgins Cc: freebsd-questions@FreeBSD.ORG Subject: Re: gcc (g++) 2.7 and templates? In-Reply-To: <37062301.5ED2D081@thekeyboard.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Yeah, gcc has some problems handling templates, if I remember correctly.. it doesn't like template classes to be declared in an external file. There is a gcc/g++ faq somewhere's that describes this problem in detail. > I'm trying to compile a C++ program that uses templates, and I keep on > getting errors, but I can't figure find anything wrong with the code. > Is there a problem with gcc 2.7 and templates? I'm compliling it with > this command: g++ -o progname main.o token.o stack.o (after compiling > the three ".o" files using "g++ -c main.cpp", etc). The error I get is: > "in main.o: undefined symbol 'stack :: push(int)' in text segment". > > Any ideas? > > Thanks, > Toby > > P.S. I tried to send this before, but I don't think it got sent. Sorry > if you get it twice. > > -- > My Waterskiing Pages (Barefoot & Wakeboarding): > http://waterski.pharamond.com > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > Jason Hudgins http://www.incantations.net/~thanatos To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message