Ubuntu C MYSQL - Compile Error -
i'm trying learn how write mysql in c, following zetcode tutorial on subject , using gcc in xubuntu 12.04 lamp server installed , mysql development library installed using apt-get. have suggestions?
i'm getting error:
undefined reference `mysql_get_client_info' collect2: ld returned 1 exit status using compile line:
gcc -i/usr/include/mysql -std=c99 -o mysqlc99.cgi mysqlc99.c with following code:
#include <my_global.h> #include <mysql.h> int main(int argc, char **argv) { printf("mysql client version: %s\n", mysql_get_client_info()); exit(0); }
Comments
Post a Comment