Skip to main content
added 672 characters in body
Source Link
Ali1S232
  • 8.7k
  • 2
  • 42
  • 60

just add every file with cpp extention in your project into "LOCAL_SRC_FILES list", and of course if you don't have a file named "HelloWorldScene.cpp", remove it from that list.

UPDATE

I'm not sure this time but I'm guessing from what I can see inside test project: there are two file with name "android.mk"

  1. jni\android.mk
  2. jni\tests\android.mk (or equivalent address based on your project name)

in the first file add

subdirs := $(addprefix $(LOCAL_PATH)/../../../,$(addsuffix /Android.mk, \
    Box2D \
    cocos2dx \
    CocosDenshion/android \
    ))

note that $(LOCAL_PATH)/../../../ should point at cocos2dx root folder change it if it is not correct

and in the second file this line should do the trick

    LOCAL_SHARED_LIBRARIES := cocosdenshion_shared box2d_shared

just add every file with cpp extention in your project into "LOCAL_SRC_FILES list", and of course if you don't have a file named "HelloWorldScene.cpp", remove it from that list.

just add every file with cpp extention in your project into "LOCAL_SRC_FILES list", and of course if you don't have a file named "HelloWorldScene.cpp", remove it from that list.

UPDATE

I'm not sure this time but I'm guessing from what I can see inside test project: there are two file with name "android.mk"

  1. jni\android.mk
  2. jni\tests\android.mk (or equivalent address based on your project name)

in the first file add

subdirs := $(addprefix $(LOCAL_PATH)/../../../,$(addsuffix /Android.mk, \
    Box2D \
    cocos2dx \
    CocosDenshion/android \
    ))

note that $(LOCAL_PATH)/../../../ should point at cocos2dx root folder change it if it is not correct

and in the second file this line should do the trick

    LOCAL_SHARED_LIBRARIES := cocosdenshion_shared box2d_shared
Source Link
Ali1S232
  • 8.7k
  • 2
  • 42
  • 60

just add every file with cpp extention in your project into "LOCAL_SRC_FILES list", and of course if you don't have a file named "HelloWorldScene.cpp", remove it from that list.