From owner-freebsd-questions Wed Nov 27 11:38: 7 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C253237B401 for ; Wed, 27 Nov 2002 11:38:05 -0800 (PST) Received: from gull.mail.pas.earthlink.net (gull.mail.pas.earthlink.net [207.217.120.84]) by mx1.FreeBSD.org (Postfix) with ESMTP id 50E1E43EA9 for ; Wed, 27 Nov 2002 11:38:05 -0800 (PST) (envelope-from parv_fm@mailsent.net) Received: from sdn-ap-010dcwashp0234.dialsprint.net ([63.188.96.234] helo=moo.holy.cow) by gull.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 18H80N-0000yl-00; Wed, 27 Nov 2002 11:37:54 -0800 Received: by moo.holy.cow (Postfix, from userid 1001) id 6B0EAB14E; Wed, 27 Nov 2002 14:39:30 -0500 (EST) Date: Wed, 27 Nov 2002 14:39:29 -0500 From: parv To: Mike McGranahan Cc: freebsd-questions@freebsd.org Subject: Re: undefined references Message-ID: <20021127193929.GA21971@moo.holy.cow> Reply-To: f-questions Mail-Followup-To: Mike McGranahan , freebsd-questions@freebsd.org References: <004601c29627$ab245090$1a00a8c0@HOME> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <004601c29627$ab245090$1a00a8c0@HOME> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 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