Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use with JNI #520

Open
BRQuad opened this issue Feb 27, 2022 · 3 comments
Open

Use with JNI #520

BRQuad opened this issue Feb 27, 2022 · 3 comments
Labels
support This is a support request.

Comments

@BRQuad
Copy link

BRQuad commented Feb 27, 2022

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 ?

@kadiwa4
Copy link
Contributor

kadiwa4 commented Feb 27, 2022

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

@BRQuad
Copy link
Author

BRQuad commented Feb 27, 2022

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

@BRQuad
Copy link
Author

BRQuad commented Mar 1, 2022

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.

@CryZe CryZe added the support This is a support request. label Sep 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support This is a support request.
Projects
None yet
Development

No branches or pull requests

3 participants