undefined reference to 'std::random_device::_M_init<std::string nst&>'

这是找别人买的一份源码,用win32编译可以通过,也能运行成功。
但是打包成APK到最后的时候出现了这个问题。
查了一下是C++11的问题,然后换了最新版的NDK,
Application.mk配置选项也改成了
APP_CPPFLAGS := -frtti -DCC_ENABLE_CHIPMUNK_INTEGRATION=1 -std=c++11 -fsigned-char
APP_CPPFLAGS += -Wno-error=format-security
APP_CPPFLAGS += -fexceptions
APP_LDFLAGS := -latomic

但还是编译不过,还是一样的问题,想问一下有没有人碰到过这个问题的。
谢谢!

你这个额解决了么 兄弟

也遇到这么问题 求高手分享解决方案

一样的问题,求楼主指点,跟你第二张图一样的。先谢谢了

有人解决了吗

大神们在哪里啊 快来解决问题啊

顶上去
我顶
我顶

.
.
.
.
.

看了一下那个CCrandom.h里面好像有注释FIXME,关于C++的东西,楼上的谁看的懂大家一起研究下

inline float rand_minus1_1() { // FIXME: using the new c++11 random engine generator // without a proper way to set a seed is not useful. // Resorting to the old random method since it can // be seeded using std::srand() return ((std::rand() / (float)RAND_MAX) * 2) -1;// return cocos2d::random(-1.f, 1.f);};/** * Returns a random float between 0 and 1. * It can be seeded using std::srand(seed); */inline float rand_0_1() { // FIXME: using the new c++11 random engine generator // without a proper way to set a seed is not useful. // Resorting to the old random method since it can // be seeded using std::srand() return std::rand() / (float)RAND_MAX;// return cocos2d::random(0.f, 1.f);

顶顶顶起来啊

应该是 stl 的问题 可是不知道怎么解决

再顶555555555555555

没人遇到这个问题么?有解决的分享一下啊

为什么只有我们3个遇到这个问题了 - -

我也遇到这样的问题了晕

@atmy 求教

来个人看看啊 这是什么原因

安卓 改成 19
android-19

这是NDK编译跟Android的没关系