delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/06/10/06:12:57

Date: Sun, 10 Jun 2001 13:12:58 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Tomas Nilsson <tnidt97 AT student DOT vxu DOT se>
cc: djgpp AT delorie DOT com
Subject: Re: template problem in djgpp
In-Reply-To: <9fvfgf$obj$1@news.lth.se>
Message-ID: <Pine.SUN.3.91.1010610130921.6827D-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Sun, 10 Jun 2001, Tomas Nilsson wrote:

> The program compiles without errors and warnings, but then something goes
> wrong in the
> linking process. The linker ld in djgpp returns the error message "undefined
> reference to class<int>::f1(void)".

Did you compile with gpp (instead of gcc)?  If you compile with gcc, you 
need to put -lstdcxx at the end of the link command line, to have the 
linker look in the library of C++ standard classes; gpp does that for you 
automatically.

> This is very strange, because the UNIX
> compiler CC can compile and build this program without any problem, and CC
> one of the best approximation of the C++ standard I know.

What CC?  What version?  What Unix?

Each compiler has its own list of issues wrt the C++ standard.  None of 
them supports the latest standard 100%.  So comparison with other 
compilers are not always meaningful.

- Raw text -


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