Skip to content

Conversation

@c0ffeeartc
Copy link

Fixes linker error when linking libcocos2d.so with option(BUILD_SHARED_LIBS ON)

@c0ffeeartc c0ffeeartc closed this Jun 2, 2015
@c0ffeeartc c0ffeeartc reopened this Jun 2, 2015
@zilongshanren
Copy link
Contributor

thanks @c0ffeeartc
Should we change other settings in order to link the libcocos2d.so?

@c0ffeeartc
Copy link
Author

For my system only these fixes were required.

here are options that I had to change temporarily for to compile and link libcocos2d.so:

set(USE_PREBUILT_LIBS_DEFAULT OFF)
if(MINGW)
  set(USE_PREBUILT_LIBS_DEFAULT OFF)
endif()

set(BUILD_CPP_TESTS_DEFAULT OFF)
set(BUILD_LUA_LIBS_DEFAULT  OFF)
set(BUILD_LUA_TESTS_DEFAULT OFF)
set(BUILD_JS_LIBS_DEFAULT   OFF)
set(BUILD_JS_TESTS_DEFAULT  OFF)

option(USE_CHIPMUNK "Use chipmunk for physics library" OFF)
option(USE_BULLET "Use bullet for physics3d library" OFF)
option(BUILD_SHARED_LIBS "Build shared libraries" ON)

Building with chipmunk, bullet, lua or js may bring other issues. But with above options + fix libcocos2d.so built fine

@zilongshanren
Copy link
Contributor

@c0ffeeartc maybe we should support building shared libraries for all projects on Linux platform.
But now this feature request doesn't have such high priority.

So I will just leave your PR here. Thanks.

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

Successfully merging this pull request may close these issues.

2 participants