gcc wont compile and run MySQL C libraries

后端 未结 7 582
不知归路
不知归路 2021-02-03 14:20
#include 
#include 

int main(int argc, char **argv)
{
  printf(\"MySQL client version: %s\\n\", mysql_get_client_info());
}

相关标签:
7条回答
  • 2021-02-03 14:51

    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.

    0 讨论(0)
提交回复
热议问题