[Gnucash-changes] r14198 - gnucash/trunk - Merge 'misc-backend'
-r 14160:14184 into trunk.
Derek Atkins
warlord at MIT.EDU
Fri May 26 11:29:22 EDT 2006
Chris,
Chris Shoemaker <chris at cvs.gnucash.org> writes:
> gnc_engine_init(int argc, char ** argv)
> {
> + static gchar *names[] = {
> + GNC_LIB_NAME, QSF_BACKEND_LIB, "gnc-backend-postgres",
> + NULL};
> + gchar **np;
[snip]
> @@ -96,12 +98,11 @@
> /* Now register our core types */
> cashobjects_register();
>
> - g_return_if_fail((qof_load_backend_library
> - (QOF_LIB_DIR, QSF_BACKEND_LIB, QSF_MODULE_INIT)));
> - g_return_if_fail((qof_load_backend_library
> - (GNC_LIBDIR, GNC_LIB_NAME, GNC_LIB_INIT)));
> + for (np = names; *np; np++) {
> + if (qof_load_backend_library(GNC_LIBDIR, *np))
> + engine_is_initialized = 1;
> + }
This is going to be problematic. You're now trying to load the QSF
Backend out of GNC_LIBDIR, which is NOT necessarily where it lives!
It lives in QOF_LIB_DIR != GNC_LIB_DIR.
I'll go ahead and fix this by changing the list of names into a list
of structures where we can define the library name and the directory..
-derek
--
Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
Member, MIT Student Information Processing Board (SIPB)
URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH
warlord at MIT.EDU PGP key available
More information about the gnucash-devel
mailing list