0

我开发了 cocos2d-x 和 SmartFoxServer。

我成功了 C++ 开发。

但是,出现了问题。移植时发生错误。

SmartFoxServer 示例编写 cocos2d-x 2.X

这个版本不适合我。但是看看我尽可能匹配的例子。错误发生太多。

这么多未定义的错误;;这是我说的错误

[armeabi] SharedLibrary : libcocos2dcpp.so
jni/boost/boost/asio/error.hpp:244: undefined reference to 'boost::system::system_category()'
jni/boost/boost/asio/error.hpp:223: undefined reference to 'boost::system::generic_category()'
jni/boost/boost/asio/error.hpp:223: undefined reference to 'boost::system::generic_category()'
jni/boost/boost/asio/error.hpp:244: undefined reference to 'boost::system::system_category()'

==================== android.mk ======================

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
LOCAL_CFLAGS += -I$(LOCAL_PATH)/boost
LOCAL_LDLIBS += $(LOCAL_PATH)/boost/lib/libboost_thread-mgw48-mt-1_59.a
LOCAL_LDLIBS += $(LOCAL_PATH)/boost/lib/libboost_regex-mgw48-mt-1_59.a
LOCAL_LDLIBS += $(LOCAL_PATH)/boost/lib/libboost_chrono-mgw48-1_59.a
LOCAL_LDLIBS += $(LOCAL_PATH)/boost/lib/libboost_iostreams-mgw48-mt-1_59.a
LOCAL_LDLIBS += $(LOCAL_PATH)/boost/lib/libboost_signals-mgw48-mt-1_59.a
LOCAL_LDLIBS += $(LOCAL_PATH)/boost/lib/libboost_filesystem-mgw48-mt-s-1_59.a
LOCAL_LDLIBS += $(LOCAL_PATH)/boost/lib/libboost_system-mgw48-mt-s-1_59.a

LOCAL_CPPFLAGS += -fexceptions
LOCAL_CPPFLAGS += -frtti

LOCAL_CFLAGS += -I$(LOCAL_PATH)/../../libs/smartfox
LOCAL_CFLAGS += -I$(LOCAL_PATH)/../../libs/cocos/platform
LOCAL_CFLAGS += -I$(LOCAL_PATH)/../../libs/smartfox/Bitswarm
LOCAL_CFLAGS += -I$(LOCAL_PATH)/../../libs/smartfox/Bitswarm/BBox
LOCAL_CFLAGS += -I$(LOCAL_PATH)/../../libs/smartfox/Controllers
LOCAL_CFLAGS += -I$(LOCAL_PATH)/../../libs/smartfox/Core/Sockets
LOCAL_CFLAGS += -I$(LOCAL_PATH)/../../libs/smartfox/Core
LOCAL_CFLAGS += -I$(LOCAL_PATH)/../../libs/smartfox/Entities/Data
LOCAL_CFLAGS += -I$(LOCAL_PATH)/../../libs/smartfox/Entities/Invitation
LOCAL_CFLAGS += -I$(LOCAL_PATH)/../../libs/smartfox/Entities/Managers
LOCAL_CFLAGS += -I$(LOCAL_PATH)/../../libs/smartfox/Entities/Match
LOCAL_CFLAGS += -I$(LOCAL_PATH)/../../libs/smartfox/Entities/Variables
LOCAL_CFLAGS += -I$(LOCAL_PATH)/../../libs/smartfox/Entities
LOCAL_CFLAGS += -I$(LOCAL_PATH)/../../libs/smartfox/Exceptions
LOCAL_CFLAGS += -I$(LOCAL_PATH)/../../libs/smartfox/FSM
LOCAL_CFLAGS += -I$(LOCAL_PATH)/../../libs/smartfox/Logging
LOCAL_CFLAGS += -I$(LOCAL_PATH)/../../libs/smartfox/Protocol/Serialization
LOCAL_CFLAGS += -I$(LOCAL_PATH)/../../libs/smartfox/Requests/Buddylist
LOCAL_CFLAGS += -I$(LOCAL_PATH)/../../libs/smartfox/Requests/Game
LOCAL_CFLAGS += -I$(LOCAL_PATH)/../../libs/smartfox/Requests/MMO
LOCAL_CFLAGS += -I$(LOCAL_PATH)/../../libs/smartfox/Requests
LOCAL_CFLAGS += -I$(LOCAL_PATH)/../../libs/smartfox/Util/md5
LOCAL_CFLAGS += -I$(LOCAL_PATH)/../../libs/smartfox/Util/XMLParser
LOCAL_CFLAGS += -I$(LOCAL_PATH)/../../libs/smartfox/Util
LOCAL_CFLAGS += -I$(LOCAL_PATH)/../../libs/smartfox/Core/OpenSSL\Win64\include


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

LOCAL_MODULE := cocos2dcpp_shared

LOCAL_MODULE_FILENAME := libcocos2dcpp

LOCAL_SRC_FILES := hellocpp/main.cpp\
                   ../../Classes/AppDelegate.cpp\
                   ../../Classes/HelloWorldScene.cpp\
                   ../../Classes/LoginServer.cpp\
    ../../libs/smartfox/SmartFox.cpp\

- - - - - - - - - - 跳过 - - - - - -

4

0 回答 0