Date: Sun, 10 Jun 2001 13:12:58 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Tomas Nilsson cc: djgpp AT delorie DOT com Subject: Re: template problem in djgpp In-Reply-To: <9fvfgf$obj$1@news.lth.se> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Precedence: bulk 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::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.