Quantcast
Channel: Cocos Forums - Latest topics
Viewing all articles
Browse latest Browse all 17070

Error when building in android studio

$
0
0

@lolflex wrote:

I get error when using command prompt to compile

cocos compile -p android -ap android-19

jni/../../Classes/AppDelegate.cpp:104: error: undefined reference to 'BattleScene::createScene()'
collect2.exe: error: ld returned 1 exit status
make.exe: *** [obj/local/armeabi/libcocos2dcpp.so] Error 1
make.exe: Leaving directory `D:/CombatBot/proj.android'
Error running command, return code: 2.

even tho I properly added the references in Android.mk like

LOCAL_SRC_FILES := hellocpp/main.cpp \
                   ../../../Classes/AppDelegate.cpp \
                   ../../../Classes/AIClass.cpp \
                   ../../../Classes/BattleScene.cpp \
                   ../../../Classes/MainMenu.cpp \
                   ../../../Classes/Modules.cpp \
                   ../../../Classes/ProjectileTemplate.cpp \
                   ../../../Classes/RobotTemplate.cpp

this.
I use ndk r10c, set my sdk build 19, and using Android Studio.
Even smallest clues are appreciated. I can provide more info if needed.

Posts: 9

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 17070

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>