-
Notifications
You must be signed in to change notification settings - Fork 149
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
how get jni acces? #364
Comments
No idea, but it is not related in any way to raylib, sorry. This is not the best place for questions and discussions, it is for issues with raylib-go. |
Why even try to use something like purego on Android, how is it going to find the library there? Does it even support Android? You anyway need C for shared library so why not just use C? |
I just looked at this, and still am not sure what you are trying to do here. JNI is used to access Java from C, of C from Java, you don't even have Java here. You just should use C, i.e. include headers you need, call what you want, and link with that library. How is JNI even related to this? |
well, sometime I need jni to call something extra ..., I was able to run my OpenCL purego wrapper on termux(android enviroment), so I would like to try in apk ... So my question is whether is |
You can see for yourself that it is not exposed. |
so, purego is primary to avoid cgo, but it is also good to avoid complicate link with headers ..., so if I (in my wrapper) create |
But you cannot avoid cgo if you want to compile library as |
In my experience, purego and cgo have exactly the same performance (i.e. I use it for some image decoders). And if I already must use cgo, I just really don't see a point to use experimental library that doesn't even work if function receives or returns a plain struct. |
well, I was found raylib-go/raylib/utils_android.go Line 37 in c3665eb
I am NOT trying avoid cgo in android, compile headers to android in Go is hard, so I was try use purego as "cheap wrapper" with many options of paths (androids are very variable with path shared lib) as I have in https://github.com/opencl-pure/pureCL/blob/9bd3c662ac677f6f25beb12282d1e267b5babade/purego_library_unix.go#L25 as I notice android libOpenCL.so is not public ..., so I was try copy to internal lib ... |
well I try to open my copy libOpenCL.so in apk (systems libs reject access) and I need location of ..., I try
but I have no luck...
please give me advise
The text was updated successfully, but these errors were encountered: