cocos2d-x
cocos2d-x copied to clipboard
cocos2d-x-4 linking error when integrating with libchipmunk on linux,How to compile libchipmunk source code?
- cocos2d-x version: cocos2d-x-4
- devices test on: ubuntu20.04
- developing environments
- NDK version
- Xcode version:
- VS version:
- browser type and version:
Steps to Reproduce:
- cd cocos-2d-x-root/
- mkdir -p build/linux-build
- make ../..
- make -j 4 error : linking error when integrating with libchipmunk.a
I want to cross-compile the libchipmunk source code, Specific steps? I would like to compile libchiomunk for specific steps? Thanks you !
Development environment system : ubuntu20.04 Dependent tools: gcc-9-aarch64-linux-gnu, g++-9-aarch64-linux-gnu [ 86%] Built target luacocos2d [ 86%] Linking CXX executable ../../../bin/lua-empty-test/lua-empty-test /usr/bin/ld: ../../../../../external/freetype2/prebuilt/linux/64-bit/libfreetype.a(ftinit.o): Relocations in generic ELF (EM: 62) /usr/bin/ld: ../../../../../external/freetype2/prebuilt/linux/64-bit/libfreetype.a(ftinit.o): Relocations in generic ELF (EM: 62) /usr/bin/ld: ../../../../../external/freetype2/prebuilt/linux/64-bit/libfreetype.a(ftinit.o): Relocations in generic ELF (EM: 62) /usr/bin/ld: ../../../../../external/freetype2/prebuilt/linux/64-bit/libfreetype.a: error adding symbols: file in wrong format collect2: error: ld returned 1 exit status make[2]: *** [engine/tests/cpp-empty-test/CMakeFiles/cpp-empty-test.dir/build.make:152: bin/cpp-empty-test/cpp-empty-test] Error 1 make[1]: *** [CMakeFiles/Makefile2:1233: engine/tests/cpp-empty-test/CMakeFiles/cpp-empty-test.dir/all] Error 2
The questions are as follows:
- I compiled the libchipmunk 7.0.0 library, which solved the above problem.
- I want to use cross-compiled cocos2d-x-4, how can I modify the CMakeLists.txt file?