From owner-freebsd-questions@FreeBSD.ORG Sat Sep 13 13:23:31 2003 Return-Path: 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 D5ABB16A4BF for ; Sat, 13 Sep 2003 13:23:31 -0700 (PDT) Received: from obsecurity.dyndns.org (adsl-64-169-107-253.dsl.lsan03.pacbell.net [64.169.107.253]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4E1FA43FE3 for ; Sat, 13 Sep 2003 13:23:30 -0700 (PDT) (envelope-from kris@obsecurity.org) Received: from rot13.obsecurity.org (rot13.obsecurity.org [10.0.0.5]) by obsecurity.dyndns.org (Postfix) with ESMTP id A411D66D32; Sat, 13 Sep 2003 13:23:24 -0700 (PDT) Received: by rot13.obsecurity.org (Postfix, from userid 1000) id 85FB3A87; Sat, 13 Sep 2003 13:23:24 -0700 (PDT) Date: Sat, 13 Sep 2003 13:23:24 -0700 From: Kris Kennaway To: Claudiu Bichir Message-ID: <20030913202324.GB17596@rot13.obsecurity.org> References: <20030913175229.68285.qmail@web41312.mail.yahoo.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="rJwd6BRFiFCcLxzm" Content-Disposition: inline In-Reply-To: <20030913175229.68285.qmail@web41312.mail.yahoo.com> User-Agent: Mutt/1.4.1i cc: freebsd-questions@freebsd.org Subject: Re: Compile error X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2003 20:23:31 -0000 --rJwd6BRFiFCcLxzm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Sep 13, 2003 at 10:52:29AM -0700, Claudiu Bichir wrote: > Hy guys ! I'm triyng to compile this simple prog. in FreeBSD 5.0: > #include > #include > =20 > int main() > { > char h[80]; > struct hostent *x; > =20 > printf("Host:");scanf("%s",h); > x=3Dgethostbyname(h); > printf("%s\n", x->h_addr_list[0][0]); > return 0; > } > =20 > but it gives me the fallowing error=20 > /var/tmp//ccDxQUWw.o(.eh_frame+0x11): undefined reference to `__gxx_perso= nality_v0' > Does anybody know why ? What command are you using to compile this? That error typically means you're trying to link C++ code using the C compiler, which will not work (you need to link it with the C++ compiler), but your example doesn't support this. Kris --rJwd6BRFiFCcLxzm Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (FreeBSD) iD8DBQE/Y3y7Wry0BWjoQKURAu3rAKCWW38NQnkxihMxYP/ZdYYXPoV3pQCg+zhk 0qJtrCFpejk0mhyJdCh7u5o= =u5q7 -----END PGP SIGNATURE----- --rJwd6BRFiFCcLxzm--