Mail Archives: djgpp/1998/07/16/08:54:15
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.
- Raw text -