Date: Sun, 5 Mar 2000 10:20:54 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: caramaith cc: djgpp AT delorie DOT com Subject: Re: odd compiler error in DJGPP... In-Reply-To: <38C1A7B4.AF973AB7@myokay.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Precedence: bulk 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.