在CentOS系统中编译mysql程序,出现这种错误:
usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libmysqlclient.a(libmysql.c.o): In function `fetch_float_with_conversion':
(.text+0x7ce): undefined reference to `floor'
/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libmysqlclient.a(libmysql.c.o): In function `fetch_float_with_conversion':
(.text+0x869): undefined reference to `floor'
/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libmysqlclient.a(client.c.o): In function `mysql_close_free_options':
... ...
我自己的解决方法是:
编译的命令里面加入许多选项,这些选项是mysqlclient