From owner-freebsd-questions@FreeBSD.ORG Thu Nov 27 10:54:02 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 5C3CA16A4CE for ; Thu, 27 Nov 2003 10:54:02 -0800 (PST) Received: from mail.caraldi.com (caraldi.com [62.212.102.95]) by mx1.FreeBSD.org (Postfix) with ESMTP id 033D143F75 for ; Thu, 27 Nov 2003 10:54:01 -0800 (PST) (envelope-from jbq@caraldi.com) Received: from watt.intra.caraldi.com (watt.intra.caraldi.com [192.168.100.101]) by mail.caraldi.com (Postfix) with ESMTP id F035C217A for ; Thu, 27 Nov 2003 19:53:59 +0100 (CET) Received: by watt.intra.caraldi.com (Postfix, from userid 1001) id 987F973; Thu, 27 Nov 2003 19:53:59 +0100 (CET) Date: Thu, 27 Nov 2003 19:53:59 +0100 From: Jean-Baptiste Quenot To: freebsd-questions@freebsd.org Message-ID: <20031127185357.GB1842@watt.intra.caraldi.com> Mail-Followup-To: freebsd-questions@freebsd.org References: <3FC64697.9090903@isc.upenn.edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="neYutvxvOLaeuPCA" Content-Disposition: inline In-Reply-To: <3FC64697.9090903@isc.upenn.edu> User-Agent: Mutt/1.5.5.1i Subject: Re: MySQL v3.23 and C API 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: Thu, 27 Nov 2003 18:54:02 -0000 --neYutvxvOLaeuPCA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Steve Blair: > The errors I get are as follows. I get these if using cc or gcc to > compile the program. >=20 > host# cc -o locserv locserv.c > /tmp/ccJdDxg3.o: In function `main': > /tmp/ccJdDxg3.o(.text+0x6ca): undefined reference to `mysql_init' > /tmp/ccJdDxg3.o(.text+0x7bc): undefined reference to `mysql_real_query' > /tmp/ccJdDxg3.o(.text+0x7f3): undefined reference to `mysql_store_result' > /tmp/ccJdDxg3.o(.text+0x80d): undefined reference to `mysql_num_rows' > /tmp/ccJdDxg3.o(.text+0x877): undefined reference to `mysql_fetch_row' >=20 > Can anyone help explain what the problem is and how to correct it? See the man page for gcc(1): -llibrary Use the library named library when linking. = =20 The linker searches a standard list of directories for the = li- brary, which is actually a file named `liblibrary.a'. The li= nk- er then uses this file as if it had been specified precisely= by name. = =20 The directories searched include several standard system dir= ec- tories plus any that you specify with `-L'. = =20 HTH, --=20 Jean-Baptiste Quenot http://caraldi.com/jbq/ --neYutvxvOLaeuPCA Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (FreeBSD) iD8DBQE/xkhF9xx3BCMc9gsRAs07AJ9zPxVB+eFhjJohFYJ3LXJgXP7qkgCeLJOB bkWgfTQYPnd56V9wuLRTOuo= =uOA/ -----END PGP SIGNATURE----- --neYutvxvOLaeuPCA--