I've been playing around with Zig for a few days and trying to use a C library (SQLite in this case) and right now I just fail to simply include it. The compiler always complains with error: C import failed which frankly speaking isn't very helpful because I can't even tell if the path for example is just wrong or something else. My code and directory tree look like this:
const std = @import("std");
const s = @cImport(@cInclude("c/sqlite3.h"));
pub fn main() !void {
_ = s.sqlite3_libversion();
// Prints to stderr (it's a shortcut based on `std.io.getStdErr()`)
std.debug.print("All your {s} are belong to us.\n", .{"codebase"});
}
Anyone knows what I am doing wrong? I know there is zig-sqlite but that's not what I want to use right now and couldn't figure it out from its source code.