【发布时间】:2010-06-14 00:12:25
【问题描述】:
我需要在不依赖 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 替代品?
【问题讨论】: