From ae1ccc1ebc1bd0b690bc9c1e2cdf5a4b1903eca8 Mon Sep 17 00:00:00 2001 From: Vincent Rischmann Date: Sat, 13 Mar 2021 21:38:07 +0100 Subject: readme: add a note about minimum glibc version --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index 841adfe..aeeff31 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,20 @@ exe.linkLibrary(sqlite); exe.addPackage(.{ .name = "sqlite", .path = "third_party/zig-sqlite/sqlite.zig" }); ``` +If you're building with glibc you must make sure that the version used is at least 2.28. + +You can do that in your `build.zig` file: +```zig +var target = b.standardTargetOptions(.{}); +target.setGnuLibCVersion(2, 28, 0); +exe.setTarget(target); +``` + +Or with `-Dtarget`: +``` +$ zig build -Dtarget=native-linux-gnu.2.28 +``` + # Usage Import `zig-sqlite` like this: -- cgit v1.2.3