Discussion:
Issue with libc++_shared
Vivek Kumar
2017-12-15 12:22:26 UTC
Permalink
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.
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/ebf812b3-1e9e-478a-bff1-0a82f413cda8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Glenn Kasten
2017-12-15 16:37:25 UTC
Permalink
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.
Post by Vivek Kumar
I am getting below error while using libc++_shared.so as c++ support
*# error "No Thread API"*
PIf anyone else has got the same issue ,please help me over here.
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/cd62e97c-a8bf-47c2-8302-139bcf53c18e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
k***@vestiacom.com
2017-12-22 09:09:01 UTC
Permalink
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...
Post by Vivek Kumar
I am getting below error while using libc++_shared.so as c++ support
*# error "No Thread API"*
PIf anyone else has got the same issue ,please help me over here.
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/c27d14c5-b9c1-4ef2-aff7-96878fdd5edd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...