error: undefined reference to ‘pthread_spin_XX’
问题:
error: undefined reference to 'pthread_spin_lock'
error: undefined reference to 'pthread_spin_unlock'
error: undefined reference to 'pthread_spin_init'
error: undefined reference to 'pthread_spin_destroy'
解决:
APP_PLATFORM 需要改成 android-24 或以上版本才支持 pthread 自旋锁。
使用 Application.mk 时,做一下修改(使用 Cmake 时也需做对应修改):
<
本文汇总了Android NDK开发中遇到的常见问题,包括'pthread_spin_XX'未定义错误、OpenCV编译问题、'std::__ndk1::__fs::filesystem::'未定义错误、栈溢出和SIGBUS信号错误。解决方案涉及更新APP_PLATFORM、调整NDK版本、检查内存分配及防止对象指针重复释放。
订阅专栏 解锁全文
1406

被折叠的 条评论
为什么被折叠?



