我们正在使用 cocos2d-x 为 Android 和 IOS 做 1 款游戏。为此,我们关注了http://www.raywenderlich.com/11283/cocos2d-x-for-ios-and-android-getting-started链接。一切正常,除了当我们尝试将 LevelHelper 链接/包含到我们的项目时,它会抛出错误
undefined reference to `LevelHelperLoader::LevelHelperLoader(char const*)'
下面是 Android.mk 文件
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := game_shared
LOCAL_MODULE_FILENAME := libgame
LOCAL_SRC_FILES := helloworld/main.cpp \
../../Classes/AppDelegate.cpp \
../../Classes/HelloWorldScene.cpp
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../Classes \
$(LOCAL_PATH)/../../../Box2D \
$(LOCAL_PATH)/../../Classes/LevelHelper \
$(LOCAL_PATH)/../../Classes/LevelHelper/
LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dx_static cocosdenshion_static box2d_static
include $(BUILD_SHARED_LIBRARY)
$(call import-module,CocosDenshion/android) $(call import-module,cocos2dx) $(call import-module,Box2D)
我们不知道我们哪里出错了。任何线索都非常有帮助。