This sounds like an interesting experiment!

There’s nothing special about header file naming. The original XACC headers had 
capitalized names, very few of the later ones do. Note, though, that headers 
having the .hpp suffix export C++-mangled symbols and I don’t think Java can 
link those without SWIG bindings.

You’ll need at least libgnc-core-utils.so <http://core-utils.so/>, it has 
utilities that the engine depends on. You’ll also need at least one of the 
backend libraries to handle persistence unless you’re planning to write your 
own.

Regards,
John Ralls


> On May 5, 2026, at 1:30 PM, NH Rao <[email protected]> wrote:
> 
> Greetings,
> 
> I am experimenting with Java FFM API to call gnucash API functions. So far I 
> am able to emulate the functionality of 
> bindings/python/example_scripts/export_account_totals.py with similar 
> results. This was a just POC and now I am seriously attempting to write 
> proper code.
> 
> Some questions
> 
> I am using headers files which start with capital letters (e.g. Account.h) as 
> it felt like convention is to expose API from these files. Did I get this 
> right?
> 
> I am just using libgnc-engine.so when importing a shared library. Do I need 
> to import any other shared libraries for the API functionality?
> 
> Many functions return const char* e.g. const char * xaccAccountGetName (const 
> Account *account); but the header file does not mention that the caller has 
> to free the returned pointer. But gnc_numeric_to_string explicitly mentions 
> that the caller has to free the memory.  Is it safe to assume that if there 
> is no explicit comment, I don't need to worry about freeing the memory
> 
> Regards,
> 
> Niranjan
> _______________________________________________
> gnucash-devel mailing list
> [email protected]
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel

_______________________________________________
gnucash-devel mailing list
[email protected]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel

Reply via email to