libmysqlclient.a Static library access method
1、 Download the source code and compile it
obtain MariaDB Source code Download the corresponding source code , Download address mariadb-5.5.56.tar.gz Download and transfer to the virtual machine , Unzip and compile .
Install the required common libraries
apt-get install bison
apt-get install flex
apt-get install ncurse-devel
apt-get install cmake
compile MariaDB obtain libmysqlclient.a
tar –zxvf mariadb-5.5.56.tar.gz
cd mariadb-5.5.56
cmake . –LH # see cmake Available options for
cmake . -DCMAKE_INSTALL_PREFIX=/home/mysql
-DMYSQL_DATADIR=/home/mysqldata -DSYSCONFDIR=/etc
-DWITHOUT_TOKUDB=1 -DMYSQL_UNIX_ADDR=/home/tmp/mysql.sock
-DDEFAULT_CHARSET=gbk -DDEFAULT_COLLATION=gbk_general_ci
make
make install
After completing the above order , stay /home/mysql/lib/ You can get libmysqlclient.a Static library files
2、 Direct access to libmysqlclient.a The way
Download compiled MariaDB file ,mariadb Download address
Find the corresponding version , I use it Linux So the corresponding mariadb-5.5.56-linux-x86_64.tar.gz
decompression
tar -zxvf mariadb-5.5.56-linux-x86_64.tar.gz
libmysqlclient.a File in directory lib Under the folder
3、 Download my uploaded directly libmysqlclient.a
In my CSDN You can find it in the resources