Problem Loading of libgame.so with fatal signal 11 in eclipse


#1

Hello All,
I m working on xcode and eclipse with cocos2dx version 2.1.2
Code is working fine in xcode for ipad.
With same code I create a new eclipse project.
My project required juce and protobuffer library.So i made separate android.mk for both of them put respective cpp files and used Build static command to build that (as same as cocos2dx,cocosdension and extension android.mk files).
In my main android.mk(under jni folder) i gave my static libraries name and respective paths.

LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dx_static cocosdenshion_static cocos_extension_static cocos2dx_librarystatic juce_static OpenSource_static cocos2dx_RUIComponentsstatic

$(call import-module,CocosDenshion/android) $(call import-module,cocos2dx) $(call import-module,extensions)$(call import-module,myprojectname/Library)$(call import-module,myprojectname/RUIComponents)$(call import-module,myprojectname/proj.android/JuceMakeFile)$(call import-module,myprojectname/proj.android/OpenSourceMakeFile)
Project is building properly.I am getting all object files inside myprojectname/proj.android/obj/local/armeabi and libgame.so inside
myprojectname/proj.android/libs/armeabi/libgame.so

all things are proper but when i launch its giving black screen with logcat message
trying to load lib /data/data/org.apps.test/lib/libgame.so
Fatal signal 11.(sigsegv)

I m not getting what is the problem y its not able to load.If any1 knows about it Plz reply.
It is related with cocos2dx version?
Thanks


#2

I’m sure I can help — I use that version and it works just fine.

When you launch … on what? Can you post the entire Android.mk?


#3

Hi Thanks for reply I am using android version 4.0.4 device and below is mine android.mk

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE := game_shared

LOCAL_MODULE_FILENAME := libgame

LOCAL_SRC_FILES := hellocpp/main.cpp …/…/Classes/AppDelegate.cpp …/…/Classes/UserInformation.cpp …/…/Classes/SqliteHelper.cpp …/…/…/Some.cppsome cpp’s from diff folder)
…/…/…/.cpp

LOCAL_C_INCLUDES := $(LOCAL_PATH)/…/…/Classes $(LOCAL_PATH)/…/…/JuicerComponents $(LOCAL_PATH)/…/…/RUIComponents $(LOCAL_PATH)/…/…/Library/jsoncpp-src-0.5.0/include/json $(LOCAL_PATH)/…/…/Library/jsoncpp-src-0.5.0/include $(LOCAL_PATH)/…/…/…/OpenSourceRepo/Trunk/ProtocolBuffer/protobuf-2.5.0/src $(LOCAL_PATH)/…/…/…/OpenSourceRepo/Trunk/boost_1_43_0

LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dx_static cocosdenshion_static cocos_extension_static cocos2dx_librarystatic juce_static OpenSource_static cocos2dx_RUIComponentsstatic

ifeq ($(CONFIG),Debug)
LOCAL_CPPFLAGS = fsigned-charfexceptions frttig O0D “JUCE_ANDROID=1” ~~D “DEBUG=1”~~D “_DEBUG=1” ~~D “JUCE_UNIT_TESTS=1”~~D “JUCER_ANDROID_7F0E4A25=1” ~~D “HAVE_PTHREAD=1”~~D “MOBILE_VERSION=1”
else
LOCAL_CPPFLAGS
= fsigned-charfexceptions frttiOs ~~D “JUCE_ANDROID=1”~~D “NDEBUG=1” ~~D “JUCE_UNIT_TESTS=1”~~D “JUCER_ANDROID_7F0E4A25=1” ~~D “HAVE_PTHREAD=1”~~D “MOBILE_VERSION=1”
endif

include $(BUILD_SHARED_LIBRARY)

$(call import-module,CocosDenshion/android) $(call import-module,cocos2dx) $(call import-module,extensions)$(call import-module,myprojectname/Library)$(call import-module, myprojectname/RUIComponents)$(call import-module, myprojectname/proj.android/JuceMakeFile)$(call import-module, myprojectname/proj.android/OpenSourceMakeFile)

Plz tell me if nything wrong.??