engine-helpers bug

Dave Peticolas dave@krondo.com
29 Oct 2001 12:09:11 -0800


--=-xdc1/PlheOdBTWWl+d6C
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Mon, 2001-10-29 at 11:25, Linas Vepstas wrote:
> On Mon, Oct 29, 2001 at 01:08:37PM -0600, Linas Vepstas was heard to rema=
rk:
> >=20
> > I've got a bug that I am not sure how to hack around.
> >=20
> > Since libgncengine.so doesn't exist any more, I assume that=20
> > libgncmod-engine.so is the right thing to link to.  However:
> >=20
> > /usr/bin/perl: relocation error: /usr/local/lib/gnucash/libgncmod-engin=
e.so.0: undefined symbol: gnc_engine_commodity_table_new
> >=20
> > # grep gnc_engine_commodity_table_new *.c
> > engine-helpers.c:gnc_engine_commodity_table_new (void)
> > gnc-book.c:  book->commodity_table =3D gnc_engine_commodity_table_new (=
);
> >=20
> > However engine-helpers.c is not a part of  libgncmod-engine.so,
> > instead, its a part of libgw-engine.so which doesn't seem like the
> > appropriate thing to link to, when using the non-g-wrapped version
> > of the engine libraries.
> >=20
> > What is the suggested fix for this?  At the moment, there is no way to
> > use the engine without also invoking guile.  Is this really the intent?
> >=20
> > --linas
>=20
> One more thing:  by explicitly linking to libgw-engine.so, I
> still can't use the engine:
>=20
> main ()
> {
> gnc_engine_init(0,0);
> gnc_session_new();
> }

You want something like this:

static void
guile_main (int argc, char **argv)
{
  gnc_module_system_init();
  gnc_module_load("gnucash/engine", 0);

  gnc_session_new(); =20
}

int
main (int argc, char **argv)
{
  gh_enter (argc, argv, guile_main);
  return 0;
}


--=-xdc1/PlheOdBTWWl+d6C
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQA73bdn5effKKCmfpIRAnvuAJ4k+0yBjz154/TotlJ8JoRE2bX3UgCffPq6
KtJ8z9Fz1dOWr1uur+VIPMc=
=POIa
-----END PGP SIGNATURE-----

--=-xdc1/PlheOdBTWWl+d6C--