#include #include int main(int argc, char **argv) { printf(\"MySQL client version: %s\\n\", mysql_get_client_info()); }
It is not a compilation error. It is a link error.
Add the mysql library to create your executable with option -lmysql should do the trick.
-lmysql