Re: undefined references in libmysqlclient.a
Philip Spradling wrote: I'm trying to link libmysqlclient into a C/C++ program using g++. But I get the following errors: /usr/lib/mysql/libmysqlclient.a(my_compress.o): In function `my_uncompress': my_compress.o(.text+0xaa): undefined reference to 'uncompress' /usr/lib/mysql/libmysqlclient.a(my_compress.o): In function `my_compress_alloc': my_compress.o(.text+0x13c): undefined reference to `compress' I really have no idea what to do here. I don't even know how to read libmysqlclient.a. Can anyone clue me in? I seem to recall this problem on Solaris. I think you need to add the -lz to link the zlib library. Regards, -- David -- Philip Spradling Unemployed C/C++/Java/SQL programmer (Who do you know who could use an experienced, talented but overeducated programmer?) [EMAIL PROTECTED] http:[EMAIL PROTECTED]/ - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
gcc linking libmySQL (unresolved load_defaults symbol)
Hi, I'm having problems porting a working client from Solaris/Linux to Windows NT (the client uses Paul DuBois' client4.c ideas to load_defaults() and getopt_long() to get connection parameters at runtime). I'm using the gcc compiler, and the compile phase seems to work fine, but when linking against the dynamic library libmysql.dll (as suggested in the mysql's INSTALL-SOURCES) I get the following unresolved references: load_defaults getopt_long optarg optind I've noted that these references are in the static library mysqlclient.lib nm mysqlclient.lib | grep load_default but not in the libmysql.lib (thus not in the libMysql.dll). In the spirit of Murphy's Law, if I attempt to link against the static mysqlclient.lib library, I get other (many) unresolved symbols. Has anybody come across and solved something like this? For the record: gcc 2.95 (minGW distribution) MySQL Ver 11.15 Distribution 3.23.38 for Win95/Win98 Windows NT 4 Regards, -- David A. James Statistics Research, Room 2C-253Phone: (908) 582-3082 Bell Labs, Lucent Technologies Fax:(908) 582-3340 Murray Hill, NJ 09794-0636 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php