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

prebuilt更新建议 #42

Open
axhlzy opened this issue Jul 17, 2023 · 0 comments
Open

prebuilt更新建议 #42

axhlzy opened this issue Jul 17, 2023 · 0 comments

Comments

@axhlzy
Copy link

axhlzy commented Jul 17, 2023

这都是两年前的prebuilt了 是时候更新一下了 (之前那你这个prebuilt,然后用到新的dex踩坑了一把)

然后有一个建议就是编译好的libpine_static.a文件给用户引用的应该修改一下 [JNI_OnLoad] (

JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved);
) 重命名一下(例如修改为Pine_JNI_OnLoad)以免链接的时候与用户原本的JNI_OnLoad冲突,这里提供两个方式修改,要么直接改源码,要么也不用改源码了直接编译好的成品用objcopy修改一下就好

objcopy --redefine-sym=JNI_OnLoad=Pine_JNI_OnLoad libpine.a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant