progschj / ThreadPool

A simple C++11 Thread Pool implementation
zlib License
7.86k stars 2.24k forks source link

android and ios support? #17

Closed ghostincircuit closed 10 years ago

ghostincircuit commented 10 years ago

I tried to compile this using android NDK r10 with no luck. There seems to be something wrong with std::future, have you tried or plan to use it on mobile platform?

progschj commented 10 years ago

I haven't tried it myself. Can you post the errors?

rubixcubin commented 10 years ago

Hey ghostincircuit Take a look at this:

Try setting the toolchain version to NDK_TOOLCHAIN_VERSION := clang and set flags to -std=c++11 LOCAL_CPPFLAGS += -std=c++11

Reference: http://stackoverflow.com/questions/17616915/c11-stdasync-in-android-ndk-does-not-work

ghostincircuit commented 10 years ago

thanks rubixcubin, it works both on ios and android. clang it not necessary, gcc4.8 is also ok, but I need to use APP_STL := c++_static, I tried gnustl but cannot pass compilation.