|
|
Choosing A Webhost: |
linking problem: my_compress.o undefined: msg#00003db.mysql.c++
Hello. I've downloaded some(all except shared-compat) rpms for my Linux from www.mysql.com. I've got simple C code connecting to database test and reading records from table TEST. Compilation is OK but durning linking porcess i recieve strange errors like: /usr/lib/mysql/libmysqlclient.a(my_compress.o)(.text+0xbc): In function `my_compress_alloc': : undefined reference to `compress' /usr/lib/mysql/libmysqlclient.a(my_compress.o)(.text+0x13a): In function `my_uncompress': : undefined reference to `uncompress' collect2: ld returned 1 exit status i'm compiling my prog.c with gcc: gcc prog.c -L/usr/lib/mysql -I/usr/include/mysql -lmysqlclient do i need to include sth else, new library? I've installed all new rpms from www.mysql.com. what do i do wrong? thanks in advance greetings R here the code i'm trying to compile: #include <sys/time.h> #include <stdio.h> #include <mysql.h> int main(char **args) { MYSQL_RES *result; MYSQL_ROW row; MYSQL *connection, mysql; int state; mysql_init(&mysql); connection = mysql_real_connect(&mysql, "amd", 0, 0,0,MYSQL_PORT, "test", 0); if( connection == NULL ) { printf(mysql_error(&mysql)); return 1; } state = mysql_query(connection, "SELECT * FROM TEST"); if( state != 0 ) { printf(mysql_error(connection)); return 1; } result = mysql_store_result(connection); printf("Rows: %d\n", mysql_num_rows(result)); while( ( row = mysql_fetch_row(result)) != NULL ) { printf("id: %s, val: %s\n", (row[0] ? row[0] : "NULL"), (row[1] ? row[1] : "NULL")); } mysql_free_result(result); mysql_close(connection); printf("Done.\n"); } -- MySQL++ Mailing List For list archives: http://lists.mysql.com/plusplus To unsubscribe: http://lists.mysql.com/plusplus?unsub=gcdmc-plusplus@xxxxxxxxxxx
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Integration with Kdeveloper?, Sinisa Milivojevic |
|---|---|
| Next by Date: | RE: linking problem: my_compress.o undefined, Darryl Rodden |
| Previous by Thread: | Re: Integration with Kdeveloper?, Sinisa Milivojevic |
| Next by Thread: | Re: linking problem: my_compress.o undefined, Sinisa Milivojevic |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |