build error with cocos2dx android.mk file


#1

Hello,

I’m porting my game to android. I had it compiling with cygwin ok but I’m having a lot of issues and need to use a proper debugger. I am setting up the project to use VisualGDB (http://visualgdb.com/).

I have hit a snag when the project goes to compile the cocos2dx libs.

make: * No rule to make target `/cygdrive/c/Game/cocos2d-2.1beta3-x-2.1.0/game/proj.android/…/…/cocos2dx/CCConfiguration.cpp’

Some how it is inserting the “/cygdrive/c/” in the path to the CCConfiguration.cpp file but I can’t figure out how. Here is my Android.mk file so far - all of my classes do compile.

LOCAL_PATH := $(call my-dir)

#
# FMOD Ex Shared Library
# 
include $(CLEAR_VARS)

LOCAL_MODULE            := fmodex
LOCAL_SRC_FILES         := ../../../CocosDenshion/third_party/fmod/api/libAndroid/armeabi-v7a/libfmodex.so
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../../CocosDenshion/third_party/fmod/api/inc

include $(PREBUILT_SHARED_LIBRARY)


include $(CLEAR_VARS)

LOCAL_MODULE := game_shared

LOCAL_MODULE_FILENAME := libgame

dirs := $(shell find $(LOCAL_PATH) -type d)

cppfiles := $(subst $(LOCAL_PATH)/,,$(wildcard $(LOCAL_PATH)/../../Classes/*.cpp))
cppfiles2 := $(subst $(LOCAL_PATH)/,,$(wildcard $(LOCAL_PATH)/../../../Common/source/*.cpp))
cppfiles3 := $(subst $(LOCAL_PATH)/,,$(wildcard $(LOCAL_PATH)/../../../Common/source/ThirdParties/*.cpp))

LOCAL_SRC_FILES := game/main.cpp \
                   $(cppfiles) \
                   $(cppfiles2) \
                   $(cppfiles3) \
                   ../../../scripting/lua/cocos2dx_support/CCLuaEngine.cpp  \
                   ../../../scripting/lua/cocos2dx_support/Cocos2dxLuaLoader.cpp    \
                   ../../../scripting/lua/cocos2dx_support/LuaCocos2d.cpp   \
                   ../../../scripting/lua/cocos2dx_support/tolua_fix.cpp                   

LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../Classes \
                    $(LOCAL_PATH)/../../../Common/source    \
                    $(LOCAL_PATH)/../../../Common/source/ThirdParties   \
                    $(LOCAL_PATH)/../../../cocos2dx \
                    $(LOCAL_PATH)/../../../cocos2dx/include \
                    $(LOCAL_PATH)/../../../cocos2dx/kazmath/include \
                    $(LOCAL_PATH)/../../../cocos2dx/platform/android    \
                    $(LOCAL_PATH)/../../../external/Box2D   \
                    $(LOCAL_PATH)/../../../CocosDenshion/include    \
                    $(LOCAL_PATH)/../../../scripting/lua/cocos2dx_support   \
                    $(LOCAL_PATH)/../../../scripting/lua/lua    \
                    $(LOCAL_PATH)/../../../scripting/lua/tolua  \
                    $(LOCAL_PATH)/../../../extensions   \
                    $(LOCAL_PATH)/../../../CocosDenshion/third_party/fmod/api/inc   \
                    $(dirs)

LOCAL_CFLAGS := -std=gnu++11 -fexceptions   
LOCAL_CPPFLAGS := -DCOCOS2D_DEBUG=1
LOCAL_CPPFLAGS += -DSTATS_OFF

LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dx_static
LOCAL_WHOLE_STATIC_LIBRARIES += cocosdenshion_static
LOCAL_WHOLE_STATIC_LIBRARIES += cocos_lua_static
LOCAL_WHOLE_STATIC_LIBRARIES += box2d_static
LOCAL_WHOLE_STATIC_LIBRARIES += cocos_extension_static

LOCAL_SHARED_LIBRARIES := fmodex

include $(BUILD_SHARED_LIBRARY)


$(call import-add-path,$(LOCAL_PATH)/../../..)
$(call import-add-path,$(LOCAL_PATH)/../../../cocos2dx/platform/third_party/android/prebuilt)
$(call import-module,CocosDenshion/android) \
$(call import-module,cocos2dx) \
$(call import-module,scripting/lua/proj.android/jni) \
$(call import-module,cocos2dx/platform/third_party/android/prebuilt/libcurl) \
$(call import-module,extensions) \
$(call import-module,external/Box2D)

Thanks


#2

The answer was just to delete the previous obj files under the folder …

game\proj.android\obj\local\armeabi\objs-debug