Path: news.net.uni-c.dk!Morten.Grouleff.Mjolner.Informatics From: Morten Grouleff Newsgroups: comp.lang.beta Subject: Re: cannot link to mysqlclient under linux Date: 24 Jun 2002 10:08:42 +0200 Organization: Mjolner Informatics. Lines: 27 Sender: mg@midgaard Message-ID: References: NNTP-Posting-Host: bifrost.mjolner.dk Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: news.net.uni-c.dk 1024906123 11128 130.225.4.254 (24 Jun 2002 08:08:43 GMT) X-Complaints-To: usenet@news.net.uni-c.dk NNTP-Posting-Date: Mon, 24 Jun 2002 08:08:43 +0000 (UTC) User-Agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.5 Xref: news.net.uni-c.dk comp.lang.beta:13259 Mirco Drick writes: > i have a program in which i make use of mysql. > I have copied all libmysqlclient.* from my libmysql-devel dir to > $BETALIB/lib/linux. > when compiling under linux (Mandrake 8.2) with MySQL 3.23.47 i get the > fellowing error during linking: > > Linking > /usr/local/beta/lib/linux/libmysqlclient.a(my_compress.o): In function `my_uncompress': > my_compress.o(.text+0xaa): undefined reference to `uncompress' > /usr/local/beta/lib/linux/libmysqlclient.a(my_compress.o): In function `my_compress_alloc': > my_compress.o(.text+0x13d): undefined reference to `compress' The linker apparently does't include "libz" in the linking process, even though the MySQL library uses it. Try adding the following line LINKOPT default '-lz'; to "$BETALIB/betadbc/betadbc_mysql.bet". If that is not possible, add it to a file in your program in the properties section, i.e. along with INCLUDE and ORIGIN. Regards, -- Morten Grouleff, M.Sc. C.S., Software Developer, Mjølner Informatics A/S. Phone: +45 70274343 Direct: +45 89425815 Fax: +45 70274344