我需要在不依赖 GLib 的情况下使用 Sqlite vapi。SQlite 是非 gobject 库,因此应该可以这样做。
但是,当我尝试使用该--profile posix
选项编译以下文件时,
using Sqlite;
void main() {
stdout.printf("Hello, World!");
}
我收到错误消息:
sqlite3.vapi:357.56-357.59: error: The symbol `GLib' could not be found
public int bind_blob (int index, void* value, int n,
GLib.DestroyNotify destroy_notify);
^^^^
sqlite3.vapi:362.68-362.71: error: The symbol `GLib' could not be found
public int bind_text (int index, owned string value, int n = -1,
GLib.DestroyNotify destroy_notify = GLib.g_free);
^^^^
sqlite3.vapi:411.42-411.45: error: The symbol `GLib' could not be found
public void result_blob (uint8[] data, GLib.DestroyNotify?
destroy_notify = GLib.g_free);
^^^^
sqlite3.vapi:420.59-420.62: error: The symbol `GLib' could not be found
public void result_text (string value, int length = -1,
GLib.DestroyNotify? destroy_notify = GLib.g_free);
^^^^
Compilation failed: 4 error(s), 0 warning(s)
似乎 sqlite vapi 中定义的几个函数引用了GLib.g_free
和GLib.DestroyNotify
符号。是否有任何posix替代品?