Date: Wed, 27 Nov 2002 14:39:29 -0500 From: parv <parv_fm@emailgroups.net> To: Mike McGranahan <mikemcg@ucla.edu> Cc: freebsd-questions@freebsd.org Subject: Re: undefined references Message-ID: <20021127193929.GA21971@moo.holy.cow> In-Reply-To: <004601c29627$ab245090$1a00a8c0@HOME> References: <004601c29627$ab245090$1a00a8c0@HOME>
next in thread | previous in thread | raw e-mail | index | archive | help
in message <004601c29627$ab245090$1a00a8c0@HOME>, wrote Mike McGranahan thusly... > > there are three source files, all of which compile. however, when > i try to link them together, i get undefined references and other > errors, such as what command (options) did you use to link? i cannot be able to help you w/ that info., but somebody else might. > retrquote.o: In function `main': > retrquote.o(.text+0x27): undefined reference to `endl(ostream &)' > retrquote.o(.text+0x34): undefined reference to `cerr' > retrquote.o(.text+0x39): undefined reference to `ostream::operator<<(char > const *)' > retrquote.o(.text+0x44): undefined reference to `ostream::operator<<(ostream > &(*)(ostream &))' are you explicitly including all the headers in each file which needs bits from them? from above it seems, you didn't include <iostream> in "retrquote.cpp" (or whatever you named it). - parv -- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021127193929.GA21971>