Issue with libc++_shared

65 views
Skip to first unread message

Vivek Kumar

unread,
Dec 15, 2017, 10:34:10 AM12/15/17
to android-ndk
 I am getting below error while using libc++_shared.so as c++ support library:

  # error "No Thread API"

PIf anyone else has got the same issue ,please help me over here.

Glenn Kasten

unread,
Dec 15, 2017, 11:37:25 AM12/15/17
to android-ndk
Can you provide a minimal snippet of source code and build file / command that shows the problem?
Also say which NDK version, host, target, etc.

kacper.k...@vestiacom.com

unread,
Dec 22, 2017, 10:27:26 AM12/22/17
to android-ndk
Adding this snippet to your CMakeLists.txt file should help:

set (THREADS_PREFER_PTHREADS_FLAG ON)
find_package(Threads REQUIRED)

and than:

target_link_libraries(${your_target} Threads::Threads)

I found it some time ago on cmake documentation...
Reply all
Reply to author
Forward
0 new messages