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

Mobile版ncnn在android studio上问题。 #632

Closed
SisterL opened this issue Oct 29, 2018 · 4 comments
Closed

Mobile版ncnn在android studio上问题。 #632

SisterL opened this issue Oct 29, 2018 · 4 comments

Comments

@SisterL
Copy link

SisterL commented Oct 29, 2018

照链接git了ncnn-mobile的工程,路径已对应,ndk-build时出现诸如
undefined reference to '__kmpc_fork_call'
undefined reference to '__kmpc_for_static_init_4'
undefined reference to '__kmpc_global_thread_num'
...
undefined reference to '__kmpc_global_thread_num'
等一系列类似错误。

@Justin-bin
Copy link

照链接git了ncnn-mobile的工程,路径已对对,ndk-build时出现诸如
未定义引用'__kmpc_fork_call'
未定义引用'__kmpc_for_static_init_4'
未定义引用'__kmpc_global_thread_num'
...
未定义引用'__kmpc_global_thread_num'
等一系列类似错误。
请在cmakelist 或者 mk 文件里配置omp

@edu-lance
Copy link

edu-lance commented Nov 2, 2018

@SisterL 遇到相同问题,还想查一下有人解决没。既然我解决了,就说一下吧。当然我是使用的cmake,不是Android.mk
openmp这玩意我也没接触过。参照example的mk配置,在cmakelist里增加 -fopenmp给cxxflag。

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp  -L${CMAKE_SOURCE_DIR}/src/main/cpp/libs/${ANDROID_ABI}")

同时当前我使用的ndkr17c,早已经不是r15c了,默认也早已不是gnustl_staticbuild.gradle指定下吧。

@SisterL
Copy link
Author

SisterL commented Nov 14, 2018

谢谢大家。

@erikaemma
Copy link

@SisterL 遇到相同问题,还想查一下有人解决没。既然我解决了,就说一下吧。当然我是使用的cmake,不是Android.mk openmp这玩意我也没接触过。参照example的mk配置,在cmakelist里增加 -fopenmp给cxxflag。

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp  -L${CMAKE_SOURCE_DIR}/src/main/cpp/libs/${ANDROID_ABI}")

同时当前我使用的ndkr17c,早已经不是r15c了,默认也早已不是gnustl_staticbuild.gradle指定下吧。

请问我在编译opencv-mobile时也报了相同的错误,想问下.a文件您是自己交叉编译的吗?

This issue was closed.
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

4 participants