Does Android support pthreads? And why when i use -pthread option i see the linker error:
i686-android-linux/bin/ld: cannot find -lpthread
#include
As far as I could see in the docs you do not need to use "-pthread". Checkout following:
http://mobilepearls.com/labs/native-android-api/#pthreads
Info from NDK offical docs states (android-ndk-r8\docs\system\libc\OVERVIEW.html):
PThread implementation:
Bionic's C library comes with its own pthread implementation bundled in. This is different from other historical C libraries which: - place it in an external library (-lpthread) - play linker tricks with weak symbols at dynamic link time
So keep in mind that Bionic includes directly pthread as opposed to standard way you are used to (with -lpthread).