Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Apr 1999 12:25:41 -0600 (CST)
From:      Jason Hudgins <thanatos@eddie.incantations.net>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: gcc (g++) 2.7 and templates?
Message-ID:  <Pine.BSF.3.96.990403122331.25837B-100000@eddie.incantations.net>
In-Reply-To: <37062301.5ED2D081@thekeyboard.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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<int> :: 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.990403122331.25837B-100000>