標籤:mysql編譯
錯誤記錄
[ 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
問題解決。
這篇部落格http://china.ygw.blog.163.com/blog/static/68719746201301593136684/ 給了巨大協助。
http://www.360doc.com/content/12/0507/10/9369336_209205930.shtml 關於cmake的一些簡單使用說明。
mysql 編譯錯誤