I’m trying to run the JNI_CreateJavaVM command from C++ using the jvm.lib library. After about 2 days of constantly re-packaging the project, I found out that the Project.Builds.cs file seems to require the PublicAdditionalLibraries call to contain the file twice.
This feels very weird but without it the linker returns:
“PackagingResults: Error: cannot open D:/…/java-jni/lib: Permission denied”
Now with that in place twice, that error is gone but the “PackagingResults: Error: undefined reference to ‘JNI_CreateJavaVM’” persists.
That being my last error I scrolled up in the log to try and find any error or warning and stumbled upon this:
“WARNING: Library ‘D:…\java-jni\lib\jvm.lib\jvm.lib’ was not resolvable to a file when used in Module ‘CardsOfYore’, assuming it is a filename and will search library paths for it. This is slow and dependency checking will not work for it.
Please update reference to be fully qualified alternatively use PublicSystemLibraryPaths if you do intended to use this slow path to suppress this warning.”
On the second error it does read the path correctly fully, making me wonder how I can fix that PublicAdditionalLibraries being read correctly? I’m running 4.24 on a GitHub fork using Visual Studio 2017, and been stuck on this darn Android build for 4 days with this 1 bug…
Hopefully somebody can help me,