Date: Thu, 16 Jul 1998 15:53:30 +0300 (IDT) From: Eli Zaretskii To: Chia cc: djgpp AT delorie DOT com Subject: Re: c:/djgpp/tmp\ccwaaaaa... undefined reference to... In-Reply-To: <6ojfpr$jsk@nnrp3.farm.idt.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Wed, 15 Jul 1998, Chia wrote: > When I try to compile, this program gives me "undefined references" to: > > String::String(char const *) > String::operator char const *(void) const > String::~String(void) > > I compile with the following command: > > gcc test.cpp -o test.exe The FAQ says in sections 8.7 and 8.9 that you should either use gxx instead of gcc, or add -lstdcxx -lgpp to your link command line. You did neither. > I'm sorry if this is in the documentation > somewhere but i've looked all over for it and not found an answer. The FAQ has an index at its end. When you cannot find something, look in the index for relevant entries. For example, in this case, the index has this entry: * Unresolved externals in C++ programs, use GXX: Section 8.7.