LiveSplit / livesplit-core

livesplit-core is a library that provides a lot of functionality for creating a speedrun timer.

Home Page:https://livesplit.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use with JNI

BRQuad opened this issue · comments

How you use livesplit-core with JNI on Linux ?

File system : /lib/livesplitcore/livesplitcore.so
Java file : System.loadLibrary("livesplitcore") (static) in LiveSplitCoreNative.java
IntelliJ : livesplitcore library in /lib/livesplitcore + livesplitcore library dependancy in the project module
Java option : -Djava.library.path=/lib/livesplitcore

And finally i have an error : UnsatisfiedLinkError: no livesplitcore in java.library.path

I have used the livesplit-core-v0.12.0-x86_64-linux-android.tar.gz file.
Does the .h and .cpp files are necessary ? And have the same name ?

I think you need to rename the library file to liblivesplitcore.so. Don't change the line System.loadLibrary("livesplitcore").

It was the solution, thank you.
But unfortunately i have an new error, and i am not sure of be able to do something :
UnsatisfiedLinkError : /lib/livesplitcore/liblivesplitcore.so: /lib/x86_64-linux-gnu/libc.so: invalid ELF header

With the x86_64-unknown-linux-gnu package i obtain an other error :
UnsatisfiedLinkError : long LiveSplitCoreNative.Run_new()

Otherwise the Run::parse(String, String, boolean) method call the inexistant LiveSplitCoreNative::Run_parseString(String, String, boolean) method.