mysql 編譯錯誤

來源:互聯網
上載者:User

標籤: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 編譯錯誤

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.