Android 是否支持 pthreads?以及为什么当我使用 -pthread 选项时会看到链接器错误:
i686-android-linux/bin/ld:找不到-lpthread
#include <pthread.h>
#include <cxxabi.h>
extern "C" int printf (const char *, ...);
int main()
{
try
{
pthread_exit (0);
}
catch (abi::__forced_unwind &)
{
printf ("caught forced unwind\n");
throw;
}
catch (...)
{
printf ("caught ...\n");
return 1;
}
}