#include #include int main(int argc, char **argv) { printf(\"MySQL client version: %s\\n\", mysql_get_client_info()); }
You forgot to link against the MySQL library. Try adding -lmysql to your compilation line.
-lmysql
See http://www.adp-gmbh.ch/cpp/gcc/create_lib.html for more information.