Perfect-mariadbclient 简体中文
C module import for MariaDB client Mac OS X
This files in this repository are part of the requirements for Swift Package Manager support and should not need to be manually cloned.
Reference and documentation for the Perfect library.
Tests performed on MacOS X EI Captain / Sierra. Prior to build this library, please ensure:
brew install mariadb-connector-c
Please also make sure that there is a .pc file is the key to build this project. If not found, please manually add the following content to /usr/local/lib/pkgconfig/mariadb.pc
prefix=/usr/local
exec_prefix=${prefix}/bin
libdir=${prefix}/lib/mariadb
includedir=${prefix}/include/mariadb
Name: mariadb
Description: MariaDB Connector/C
Version: 5.5.1
Requires:
Libs: -L${libdir} -lmariadb -ldl -lm -lpthread
Cflags: -I${includedir}
Libs_r: -L${libdir} -lmariadb -ldl -lm -lpthread
Please replace the above path if need.
Then please also edit your ~/.bash_profile with the following line:
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig"
once done, reload this profile as
source ~/.bash_profile
The idea of the above commands is to config clang + pkg-config properly. For more information, please check the man page of pkg-config:
man pkg-config
For more information on the Perfect project, please visit perfect.org.