[GNC] Using libgnc-engine.so
NH Rao
nhrdls at gmail.com
Sat May 2 12:05:55 EDT 2026
Greetings,
Everything on Ubuntu 24.04 if that matters.
I am experimenting with (relatively new) Java FFM API which allows
interacting with shared libraries using Java. I wanted to see if I can use
gnucash API to coax some information I care about in the format I
want. I've cloned gnucash sources and using it as a reference.
So far I have successfully managed to generate Java bindings but struggling
with basic operation sequences. I am using some of the tests e.g.
gtest-load-save-files.cpp as an example of how operations are being done.
I am getting an error 'failed to get_backend using access method "file"'
when trying to open the file whether I provide URI format like file:// or
just absolute path. At this moment, the file does not exist and I was
hoping to save a newly created file.
Essentially the order of operations is as follows even though it has all
the Java syntax tagged.
qof_init()
book = qof_book_new()
session = qof_session_new(book)
qof_sesson_begin(session, "file path", SESSION_NEW_STORE)
Can you please suggest what I am doing wrong and why I am getting
the errors. Looks like I forgot to do some basic steps.
Regards,
Niranjan
More information about the gnucash-user
mailing list