-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
为什么我拿ncnn编译出来的.a文件编译so的时候会报undefined reference to '__kmpc_fork_call'的错误 #292
Comments
LOCAL_CFLAGS += -fopenmp 参考 https://github.com/Tencent/ncnn/blob/master/examples/squeezencnn/jni/Android.mk |
你好,谢谢你的回复。但是我有点看不明白。您的意思是我少了这三行代码吗?我的Android.mk文件里有这三行代码的,是我少了什么库吗? |
你好,还有一个问题,我编译出来的libncnn.a有4560KB,而你们给出的libncnn.a不到1000KB,请问是什么原因呢?我是按照https://github.com/Tencent/ncnn/wiki/how-to-build这里面的步骤进行编译的。如果方便请回复一下。 |
android ndk 自带的cmake toolchain自动加上了 -g 编译,把 toolchain cmake 里的 -g 删掉重新编译一次就小了 |
android ndk 版本用 r15c 或者更新的 |
请问解决了吗?我也是碰到了同样的问题,build.sh发生了变化,现在用的是ndk自带的toolchain cmake,请问在编译的时候需要修改toolchain cmake里面的内容以支持openmp吗? |
我没有修改toolchain cmake里面的东西,我修改了.build.sh里面的东西就编译ok了。 |
新版使用了 android-ndk clang 编译器编译,openmp 运行时库对应于 libomp.a |
@nihui, can be the ncnn static library libncnn.a compiled with APP_STL :=c++_static . The released version is compiled with gnustl_static? |
@nihui, when i was packing libncnn.a into shared library with other libraries by settings stl as c++_static. it threw errors like: |
these errors were fixed by rebuilt ncnn library with c++_static stl. |
open Application.mk #APP_STL := stlport_static NDK_TOOLCHAIN_VERSION := 4.9I solve this error like this: NDK_TOOLCHAIN_VERSION := 4.9 >>>>> #NDK_TOOLCHAIN_VERSION := 4.9 |
@nihui, 我用新版本出现类似的错误 我使用的是Android studio的cmake方式进行调用,请问如何解决,具体的指令我没有找到 |
it has .so file after commend this line #NDK_TOOLCHAIN_VERSION := 4.9 |
but after commented NDK_TOOLCHAIN_VERSION := 4.9, the .so will be Invalid |
我这边也是添加了这三行code,还是不行,请问你是怎么解决的呢? |
我添加了这个,还是报错,是需要openmp这个库吗? |
你好,请问怎么修改呢,谢谢啊 |
@bobby-chiu |
你好,我想请问一下:
我拿ncnn编译出来的.a文件,用ndk-build编译.so的时候会报
undefined reference to '__kmpc_fork_call'
undefined reference to '__kmpc_for_static_init_4'
undefined reference to '__kmpc_for_static_fini'
undefined reference to '__kmpc_for_static_init_4'
layer/convolutiondepthwise.cpp:176: error:undefined reference to '__kmpc_for_static_init_8'
The text was updated successfully, but these errors were encountered: