Error Compiling Sample Project Ninja Fight

0 votes

Hi, every one..

I'm trying to learning appwarp with cocos2d-x.

i've downloaded the sample project from github and compile it using eclipse. i follow the instruction from that project, but when i compile it i got some error message such as "undefined reference to 'curl_easy_cleanup'".

Can any one suggest me the solutions for that problem??

i use eclipse and cocos2d-x v 3.2.

(thank's for your kindness)

asked Jan 23, 2015 in AppWarp by imam_choy (12 points)
recategorized Jan 23, 2015 by sushil

1 Answer

+1 vote
Hi,

You need to enable network support. For example for Android, you need to modify Android.mk. You will have to enable network module in Android.mk. Similarly if you are building for iOS/WP8, you need to add curl lib path in IDE settings,

Thanks
answered Jan 23, 2015 by Suyash Mohan (900 points)
Thanks for your fast response ^_^

i changed android.mk to this :

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

$(call import-add-path,$(LOCAL_PATH)/../../cocos2d)
$(call import-add-path,$(LOCAL_PATH)/../../cocos2d/external)
$(call import-add-path,$(LOCAL_PATH)/../../cocos2d/cocos)

LOCAL_MODULE := cocos2dcpp_shared

LOCAL_MODULE_FILENAME := libcocos2dcpp

LOCAL_SRC_FILES := hellocpp/main.cpp \
                   ../../Classes/AppDelegate.cpp \
                   ../../Classes/HelloWorldScene.cpp \
                   ../../Classes/Player.cpp \
                   ../../Classes/StartGameLayer.cpp \
                   ../../AppWarpX/appwarp_extended.cpp \
                   ../../AppWarpX/appwarp.cpp \
                   ../../AppWarpX/base64.cpp \
                   ../../AppWarpX/cJSON.c \
                   ../../AppWarpX/HMAC_SHA1.cpp \
                   ../../AppWarpX/requests.cpp \
                   ../../AppWarpX/SHA1.cpp \
                   ../../AppWarpX/socket.cpp \
                   ../../AppWarpX/udpsocket.cpp \
                   ../../AppWarpX/urlencode.cpp \
                   ../../AppWarpX/utilities.cpp
                   
                   

LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../Classes

LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dx_static
LOCAL_WHOLE_STATIC_LIBRARIES += cocosdenshion_static

LOCAL_WHOLE_STATIC_LIBRARIES += cocos_curl_static

# LOCAL_WHOLE_STATIC_LIBRARIES += box2d_static
# LOCAL_WHOLE_STATIC_LIBRARIES += cocosbuilder_static
# LOCAL_WHOLE_STATIC_LIBRARIES += spine_static
# LOCAL_WHOLE_STATIC_LIBRARIES += cocostudio_static
# LOCAL_WHOLE_STATIC_LIBRARIES += cocos_network_static
# LOCAL_WHOLE_STATIC_LIBRARIES += cocos_extension_static


include $(BUILD_SHARED_LIBRARY)

$(call import-module,.)
$(call import-module,audio/android)

$(call import-module,curl/prebuilt/android)

# $(call import-module,Box2D)
# $(call import-module,editor-support/cocosbuilder)
# $(call import-module,editor-support/spine)
# $(call import-module,editor-support/cocostudio)
# $(call import-module,network)
# $(call import-module,extensions)


---------------------------------------------------------------------------------------------
I can compile it well. but now i only see a start button. and if i click it, nothing is happened.
i dont see any message in log cat.
is there something wrong with the sample project ??
What is the signature of onConnectDone? The signature has changed. If your are still using onConnectDone(int) then it will not work. The method has a new definition. Please use onConnectDone(int result, int reason)
Wow.... it works ... ^_^..
i've spent so many times just to find out this problem, and now it's solved..
thank's a lot.
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...