2
在Xcode中沒有問題,但在Eclipse中很不幸。爲Cocos2d-x Eclipse構建cURL,對我而言缺少一些東西
我這樣做在Android.mk:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := game
LOCAL_MODULE_FILENAME := libgame
LOCAL_SRC_FILES := helloworld/main.cpp \
../../Classes/AppDelegate.cpp \
../../Classes/HelloWorldScene.cpp\
../../Classes/GameplayLayer.cpp\
../../Classes/swimmerc.cpp\
../../Classes/pugixml.cpp
LOCAL_C_INCLUDES := ../../libs/cocos2dx \
../../libs/cocos2dx/platform \
../../libs/cocos2dx/include \
../../libs/CocosDenshion/include \
$(LOCAL_PATH)/../../Classes/\
LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dx_static cocosdenshion_static curl_static
include $(BUILD_SHARED_LIBRARY)
$(call import-module,cocos2dx)
$(call import-module,cocos2dx/platform/third_party/android/prebuilt/libcurl)
$(call import-module,CocosDenshion/android)
我把類的curl
文件夾。然後我將它包含在GameplayLayer.cpp
中。 沒有錯誤發生,如果我使用
CURL *curl;
CURLcode res;
但只要我把
curl = curl_easy_init();
我得到一個錯誤,
make: *** [obj/local/armeabi/libgame.so] Error 1
請幫幫忙,我很樂意給我的一個腎臟作爲交換讓這個%&#@工作。
我越來越:
undefined reference to `curl_easy_init'
我錯過了這兩者與線: '$(調用導入模塊,cocos2dx/platform/third_party/android/prebuilt/libcurl)' –