Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cocos2d-x-4 linking error when integrating with libchipmunk on linux,How to compile libchipmunk source code? #20755

Open
Sickyour opened this issue Nov 16, 2022 · 1 comment

Comments

@Sickyour
Copy link

Sickyour commented Nov 16, 2022

  • 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:

  1. cd cocos-2d-x-root/
  2. mkdir -p build/linux-build
  3. make ../..
  4. 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 !

@Sickyour Sickyour changed the title cocos2d-x-4 linking error when integrating with libchipmunk on linux,How to compile libchipmunk source code, cocos2d-x-4 linking error when integrating with libchipmunk on linux,How to compile libchipmunk source code? Nov 16, 2022
@Sickyour
Copy link
Author

Sickyour commented Nov 17, 2022

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:

  1. I compiled the libchipmunk 7.0.0 library, which solved the above problem.
  2. I want to use cross-compiled cocos2d-x-4, how can I modify the CMakeLists.txt file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant