错误记录
[ 82%] Building C object libmysql/CMakeFiles/clientlib.dir/__/sql-common/client.c.o
/usr/local/src/mysql-5.6.16/sql-common/client.c:1902: error: ‘cli_list_fields’ undeclare d here (not in a function)
/usr/local/src/mysql-5.6.16/sql-common/client.c:1903: error: ‘cli_read_prepare_result’ u ndeclared here (not in a function)
/usr/local/src/mysql-5.6.16/sql-common/client.c:1904: error: ‘cli_stmt_execute’ undeclar ed here (not in a function)
/usr/local/src/mysql-5.6.16/sql-common/client.c:1905: error: ‘cli_read_binary_rows’ unde clared here (not in a function)
/usr/local/src/mysql-5.6.16/sql-common/client.c:1906: error: ‘cli_unbuffered_fetch’ unde clared here (not in a function)
/usr/local/src/mysql-5.6.16/sql-common/client.c:1908: error: ‘cli_read_statistics’ undec lared here (not in a function)
/usr/local/src/mysql-5.6.16/sql-common/client.c: In function ‘cli_read_query_result’:
/usr/local/src/mysql-5.6.16/sql-common/client.c:4113: warning: implicit declaration of f unction ‘handle_local_infile’
make[2]: *** [libmysql/CMakeFiles/clientlib.dir/__/sql-common/client.c.o] Error 1
make[1]: *** [libmysql/CMakeFiles/clientlib.dir/all] Error 2
make: *** [all] Error 2
5.5 以后编译都是cmake,一般来说,为了代码简洁,共编译的目录都是单独建立,避免污染原代码。由是尝试在解压后代码目录中再新建build子目录,然后进入该build子目录,并执行如下命令进行编译:cmake ..make
问题解决
解决方法2: 不新建目录,使用cmake .
然后make
问题解决。