![]() configure part, around the CROSS/LDFLAGS parts) and rebuild. Add ASFLAGS'-DANDROID' on the configure command (before the. I’ve found topic with similar problem, but it seems wasn’t solved CCConsole. Ah, apparently there is some assembly code which calls rand (), which doesn't check the headers, but checks for the ANDROID define instead. Make.exe: Leaving directory `C:/projects/TheGame/TheGame/proj.android’ Using Android Studio you will be able to install Android NDK and Android SDK with Android Studio UI. The API level you build against with the NDK has a very different meaning than compileSdkVersion does for Java. EOM end end class PlatformDirNotFound < StandardError. Gdbsetup : libs/armeabi/gdb.setupĬ:/projects/TheGame/TheGame/cocos2d/cocos/./2d/CCParticleSystem.cpp:608: error: undefined reference to ‘rand’Ĭ:/projects/TheGame/TheGame/cocos2d/cocos/./platform/CCFileUtils.cpp:275: error: undefined reference to ‘atof’Ĭ:/projects/TheGame/TheGame/cocos2d/cocos/./platform/CCFileUtils.cpp:284: error: undefined reference to ‘atof’Ĭ:/projects/TheGame/TheGame/cocos2d/cocos/./base/CCConsole.cpp:1232: error: undefined reference to ‘srand’Ĭ:/projects/TheGame/TheGame/cocos2d/cocos/./base/CCConsole.cpp:1233: error: undefined reference to ‘rand’Ĭ:/projects/TheGame/TheGame/cocos2d/cocos/./base/CCConsole.cpp:1261: error: undefined reference to ‘srand’Ĭ:/projects/TheGame/TheGame/cocos2d/cocos/./base/CCConsole.cpp:1262: error: undefined reference to ‘rand’Ĭ:/projects/TheGame/TheGame/cocos2d/cocos/./base/ccUtils.cpp:255: error: undefined reference to ‘atof’Ĭ:/projects/TheGame/TheGame/cocos2d/cocos/./base/ccRandom.h:117: error: undefined reference to ‘rand’Ĭ:/projects/TheGame/TheGame/cocos2d/cocos/./2d/CCActionTiledGrid.cpp:278: error: undefined reference to ‘srand’Ĭ:/projects/TheGame/TheGame/cocos2d/cocos/./2d/CCActionTiledGrid.cpp:603: error: undefined reference to ‘srand’Ĭollect2.exe: error: ld returned 1 exit status Set ANDROIDNDKHOME environment variable or set :ndkhome parameter. Linking errors on Android with OpenCV 3.4. I’ve tried build app with command: cocos run -p android -ap android-19 but it was failed at compilation time with output message: ![]() LLDB: the debugger Android Studio uses to debug native code. You do not need this component if you only plan to use ndk-build. CMake: an external build tool that works alongside Gradle to build your native library. ndk-build is a set of scripts for invoking Make 3. To build code with NDK, there are three ways: ndk-build, cmake, standalone toolchains 1. I’ve built my game with command cocos run -p android -ap android-21, it works fine, my game successfully started on 2 diffrent devices with android 5.0 and 6.0.1, but when I tried to run it on device with android version 4.3 game was crashed. The Android Native Development Kit (NDK): a set of tools that allows you to use C and C++ code with Android. Android’s developers (Google) have built a tool called NDK (Native Development Kit) to integrate C/C++ code in your application. ![]()
0 Comments
Leave a Reply. |