Date: Wed, 10 Oct 2001 14:44:37 +1000 From: Edwin Groothuis <edwin@mavetju.org> To: Matthew Blacklow <matthew.blacklow@ticca.com> Cc: FreeBSD Questions <FreeBSD-Questions@FreeBSD.ORG> Subject: Re: GCC liinking problems Message-ID: <20011010144437.B2865@k7.mavetju.org> In-Reply-To: <NFBBICMIIEMNIMGOBPCMCEFPCCAA.matthew.blacklow@ticca.com>; from matthew.blacklow@ticca.com on Wed, Oct 10, 2001 at 02:30:05PM %2B1000 References: <20011010001755.D617@hal9000.servehttp.com> <NFBBICMIIEMNIMGOBPCMCEFPCCAA.matthew.blacklow@ticca.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Oct 10, 2001 at 02:30:05PM +1000, Matthew Blacklow wrote: > I am trying to compile a program which includes the mysql.h header file. > Everytime I attempt to compile it I get the following error message: > "/tmp/cc6Sg0gZ.o(.text+0x3c): undefined reference to `mysql_init'" > as well as errors for the other mysql functions I call. > > I am compiling it using the following line: > "gcc code.c -I/usr/home/matthew/MySQL/include/" > and the header files are located in that directory. Yes, but the problem is from the linker, not from the compiler. If you add "-L/usr/local/lib/mysql -lmysqlclient" with it it will go much better. Edwin -- Edwin Groothuis | Personal website: http://www.MavEtJu.org edwin@mavetju.org | Interested in MUDs? Visit Fatal Dimensions: ------------------+ http://www.FatalDimensions.org/ 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?20011010144437.B2865>