Re: [Vala] Sqlite vapi in the posix profile



2010/6/14, Celil <celil kj gmail com>:
I need to use the Sqlite vapi without any depedence on GLib.

 When I try to compile the attached file with the `--profile posix`
 option, however, I get the following error messages:

 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)

 It seems that only 4 functions have this GLib dependence, and I could
 easily remove it by commenting them out for now. Is there a better way
 to remove the GLib dependence?
There are defines added automatically by vala (GOBJECT, POSIX or DOVA
depending on the profile), you can wrap the offending functions in an
#if (and maybe provide an alternative binding when using posix, e.g.
Posix.FILE instead of GLib.FileStream)

HTH,
Abderrahim



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]