编译libmysqlclient.a静态库

mysql版本:mysql-5.7.17

依次执行:

cd /home

wget https://sourceforge.net/projects/boost/files/boost/1.59.0/boost_1_59_0.tar.gz
tar -zxvf boost_1_59_0.tar.gz

wget https://cdn.mysql.com/Downloads/MySQL-5.7/mysql-5.7.17.tar.gz
tar -zxvf mysql-5.7.17.tar.gz


生成makefile:
cd mysql-5.7.17
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/usr/local/mysql/data -DMYSQL_UNIX_ADDR=/tmp/mysql.sock -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_BOOST=/home/boost_1_59_0

编译
make -j4

静态库位置:
mysql-5.7.17/libmysql/libmysqlclient.a

上一篇:编译安装时出现依赖文件故障的解决方法


下一篇:linux内存碎片