#include #include int main(int argc, char **argv) { printf(\"MySQL client version: %s\\n\", mysql_get_client_info()); }
You need gcc -o mysql-test MySQL-Test.c -L/usr/local/mysql/lib -lmysqlclient -lz
gcc -o mysql-test MySQL-Test.c -L/usr/local/mysql/lib -lmysqlclient -lz
Replace -L/usr/local/mysql/lib with wherever you client library is (if it isn't already in your libpath)
-L/usr/local/mysql/lib
See the MySql instructions for building clients.