www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/03/05/06:12:31

Date: Sun, 5 Mar 2000 10:20:54 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: caramaith <caramaith AT myokay DOT net>
cc: djgpp AT delorie DOT com
Subject: Re: odd compiler error in DJGPP...
In-Reply-To: <38C1A7B4.AF973AB7@myokay.net>
Message-ID: <Pine.SUN.3.91.1000305101719.29735d-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: dj-admin AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Sun, 5 Mar 2000, caramaith wrote:

>  e:/djgpp/lib/gcc-lib/djgpp/2.952/collect2.exe e:/djgpp/lib/crt0.o
> -Le:/djgpp/lib -Le:/djgpp/lib/gcc-lib/djgpp/2.952 -Le:/djgpp/bin
> -Le:/djgpp/lib e:/djgpp/tmp\ccapuWwM.o -lgcc -lc -lgcc -Tdjgpp.djl
> e:/djgpp/tmp\ccapuWwM.o(.text+0x84):cpplibtest.cpp: undefined reference
> to `Stash::initialize(int)'

The above command doesn't link in any C++ libraries.  Are all the code 
for the Stash class inside cpplibtest.cpp?  If not, the linker complains 
because you didn't tell it where to look for the definition of that class.

> e:/djgpp/tmp\ccapuWwM.o(.text+0x113):cpplibtest.cpp: undefined reference
> to `cout'

This is because you need to use gpp instead of gcc to link C++ programs.  
It's in the FAQ.

- Raw text -


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