compat.libmysqlclient
MySQL C API client library (static, client-only source)
mcpp add compat.libmysqlclient@8.4.6
Usage
From this repository's own test project — built and run by CI, not written for the website.
#ifdef HAVE_LIBMYSQLCLIENT
#include <mysql.h>
// 断言客户端 ABI 版本,并确认初始化得到可用的运行时句柄。
int main() {
static_assert(MYSQL_VERSION_ID == 80406);
if (mysql_get_client_version() != 80406) return 1;
MYSQL* client = mysql_init(nullptr);
if (client == nullptr) return 2;
mysql_close(client);
return 0;
}
#else
#error "HAVE_LIBMYSQLCLIENT must be enabled for every declared libmysqlclient test platform"
#endif
tests/examples/libmysqlclient/tests/client.cpp · project tests/examples/libmysqlclient
Build
Form A package: the upstream archive ships its own mcpp.toml. Its contents have not been fetched into this build — run the index's refresh action to pull them in.
Versions
| Version | Platforms | Mirrors | sha256 |
|---|---|---|---|
8.4.6 latest |
LinuxWindowsmacOS | source | 0c2d4b1b25d8… |