/Perfect-mariadbclient

C module import for MariaDB client.

Primary LanguageSwiftApache License 2.0Apache-2.0

Perfect-mariadbclient 简体中文

Get Involed with Perfect!

Star Perfect On Github Chat on Gitter Follow Perfect on Twitter Join the Perfect Slack

Swift 3.0 Platforms OS X | Linux License Apache PerfectlySoft Twitter Join the chat at https://gitter.im/PerfectlySoft/Perfect Slack Status

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.

Perfect-MariaDB

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

Further Information

For more information on the Perfect project, please visit perfect.org.