Skip to content

linking error when integrating with libchipmunk on linux #20471

@JakkuSakura

Description

@JakkuSakura
  • cocos2d-x version: v4.0
  • devices test on: manjaro linux
  • developing environments
    gcc 9.2.1
    This reproduces every time I try to compile a hello world cpp project. When I turned off physics both in ccConfig.h and external/CMakeLists.txt. It's finally avoided but not solved yet.
    It seems like that I missed some dependencies, since I cannot install these libraries listed on install-deps-linux.sh directly.
    I tried recompiling the libchipmunk and replace it, but it remains other linking errors with cocos2dx itself.
/usr/bin/ld: ../frameworks/cocos2d-x/external/chipmunk/prebuilt/linux/64-bit/libchipmunk.a(cpDampedRotarySprin
g.c.o): in function `preStep':
cpDampedRotarySpring.c:(.text+0xf2): undefined reference to `__expf_finite'
/usr/bin/ld: ../frameworks/cocos2d-x/external/chipmunk/prebuilt/linux/64-bit/libchipmunk.a(cpGrooveJoint.c.o):
 in function `preStep':
cpGrooveJoint.c:(.text+0x327): undefined reference to `__powf_finite'
/usr/bin/ld: ../frameworks/cocos2d-x/external/chipmunk/prebuilt/linux/64-bit/libchipmunk.a(cpSlideJoint.c.o): 
in function `preStep':
cpSlideJoint.c:(.text+0x42b): undefined reference to `__powf_finite'
/usr/bin/ld: ../frameworks/cocos2d-x/external/chipmunk/prebuilt/linux/64-bit/libchipmunk.a(cpPivotJoint.c.o): 
in function `preStep':
cpPivotJoint.c:(.text+0x1e8): undefined reference to `__powf_finite'
/usr/bin/ld: ../frameworks/cocos2d-x/external/chipmunk/prebuilt/linux/64-bit/libchipmunk.a(cpRatchetJoint.c.o)
(much more the same error)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions