Apologies for the long delay with this. I'm looking at it again but I'm still having the same issue.
I've created the following LlamaWrapper.java file, compiled to a LlamaWrapper.class file, and then used 'jar cvf LlamaWrapper.jar LlamaWrapper.class' to get a .jar file.
public class LlamaWrapper {
static {
System.loadLibrary("c++_shared"); // Load the shared library
System.loadLibrary("llama-cli"); // Load your native library
}
// Native method declaration
public native String runLlama(String[] args);
// You can add more methods to interact with the native library
}
I've added the LlamaWrapper.jar file to B4A and it shows in my libraries(and is enabled), however I still get the same error --> 'Err: CANNOT LINK EXECUTABLE "/data/user/0/b4a.example/files/llama.cpp/llama-cli": library "libc++_shared.so" not found: needed by main executable'
I'm sure I must be missing something simple at this point, but can't seem to get to the bottom of it.
As always, any help is very much appreciated! Thank you.
EDIT: I've uploaded a copy of my project to my Google Drive -
Is is missing the >2GB llama model, but the llama-cli should still be able to run without that.