compat.sqlite3
#includeSQLite — self-contained SQL database engine (C amalgamation)
#include <sqlite3.h>
mcpp add compat.sqlite3@3.45.3
用法
来自本仓库自己的测试项目 —— CI 真的编译并运行过,不是为了网站写的。
// Behavioral test for compat.sqlite3 (SQLite 3.45.3, C API): assert the
// resolved library version, then open an in-memory database, create a table,
// insert a row, and read it back through both sqlite3_exec and a prepared
// statement.
#include <sqlite3.h>
#include <cassert>
#include <cstring>
int main() {
// The index pins 3.45.3; prove the resolved package is that version.
assert(std::strcmp(sqlite3_libversion(), "3.45.3") == 0);
sqlite3* db = nullptr;
assert(sqlite3_open(":memory:", &db) == SQLITE_OK);
assert(db != nullptr);
// DDL + DML through the convenience API.
char* errmsg = nullptr;
int rc = sqlite3_exec(db,
"CREATE TABLE t(id INTEGER PRIMARY KEY, name TEXT NOT NULL);"
"INSERT INTO t(name) VALUES ('mcpp');",
nullptr, nullptr, &errmsg);
// …
tests/examples/sqlite3/tests/sqlite3_test.cpp · 项目 tests/examples/sqlite3
openkal
| 目标 | 结果 | 环境 | 测试项目 | 首条诊断 |
|---|---|---|---|---|
| x86_64-linux-gnu | runs | posix | sqlite3 | |
| x86_64-windows-musl | runs | posix | sqlite3 |
测量方式
2026-09-23 由 tests/openkal/compat.py 测得,使用 openkal-llvm-runtime 0.15.1、llvm@22.1.8、mcpp 2026.9.21.3。测试项目没有自行选择平台依赖。 上方徽章是所有已测目标里最严格那个的结果 —— 上表列出每个目标各自的环境。
构建
- targets
sqlite3 (lib)- language
c++23- C standard
c11- import std
- no
- include dirs
*
源文件 (1)
*/sqlite3.c
版本
| 版本 | 平台 | 镜像 | sha256 |
|---|---|---|---|
3.45.3 最新 |
LinuxWindowsmacOS | 源站 | ea170e73e447… |