@eht wrote:
The first issue (SOLVED):
/opt/cocos2d-x/cocos/2d/CCActionCamera.cpp:197:22: error: ‘isnan’ was not declared in this scope if( isnan(_angleX) ) ^ /opt/cocos2d-x/cocos/2d/CCActionCamera.cpp:197:22: note: suggested alternative: In file included from /usr/include/c++/5.3.0/random:38:0, from /opt/cocos2d-x/cocos/base/ccRandom.h:29, from /opt/cocos2d-x/cocos/base/ccMacros.h:73, from /opt/cocos2d-x/cocos/math/CCGeometry.h:32, from /opt/cocos2d-x/cocos/2d/CCAction.h:32, from /opt/cocos2d-x/cocos/2d/CCActionInterval.h:33, from /opt/cocos2d-x/cocos/2d/CCActionCamera.h:31, from /opt/cocos2d-x/cocos/2d/CCActionCamera.cpp:28: /usr/include/c++/5.3.0/cmath:641:5: note: ‘std::isnan’ isnan(_Tp __x) cocos/CMakeFiles/cocos2d.dir/build.make:86: recipe for target 'cocos/CMakeFiles/cocos2d.dir/2d/CCActionCamera.cpp.o' failed make[2]: *** [cocos/CMakeFiles/cocos2d.dir/2d/CCActionCamera.cpp.o] Error 1 CMakeFiles/Makefile2:419: recipe for target 'cocos/CMakeFiles/cocos2d.dir/all' failed make[1]: *** [cocos/CMakeFiles/cocos2d.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2
This is resolved by simply running:
sed -i 's/isnan/std::isnan/g' `grep "isnan" -rl`
The second issue (UNRESOLVED):
[ 17%] Building C object cocos/scripting/lua-bindings/CMakeFiles/luacocos2d.dir/__/__/__/external/lua/lua/ltable.c.o In file included from /home/eht/tools/cocos2d-x-3.10/external/lua/lua/lua.h:16:0, from /home/eht/tools/cocos2d-x-3.10/external/lua/lua/ltable.c:27: /home/eht/tools/cocos2d-x-3.10/external/lua/lua/luaconf.h:543:20: warning: ISO C99 requires whitespace after the macro name #define luai_numstd::isnan(a) (!luai_numeq((a), (a))) ^ /home/eht/tools/cocos2d-x-3.10/external/lua/lua/ltable.c: In function ‘luaH_set’: /home/eht/tools/cocos2d-x-3.10/external/lua/lua/luaconf.h:543:20: error: expected expression before ‘:’ token #define luai_numstd::isnan(a) (!luai_numeq((a), (a))) ^ /home/eht/tools/cocos2d-x-3.10/external/lua/lua/ltable.c:501:33: note: in expansion of macro ‘luai_numstd’ else if (ttisnumber(key) && luai_numstd::isnan(nvalue(key))) ^ cocos/scripting/lua-bindings/CMakeFiles/luacocos2d.dir/build.make:302: recipe for target 'cocos/scripting/lua-bindings/CMakeFiles/luacocos2d.dir/__/__/__/external/lua/lua/ltable.c.o' failed make[2]: *** [cocos/scripting/lua-bindings/CMakeFiles/luacocos2d.dir/__/__/__/external/lua/lua/ltable.c.o] Error 1 CMakeFiles/Makefile2:672: recipe for target 'cocos/scripting/lua-bindings/CMakeFiles/luacocos2d.dir/all' failed make[1]: *** [cocos/scripting/lua-bindings/CMakeFiles/luacocos2d.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2
Any help appreciated.
Posts: 1
Participants: 1