Creating a Scene

In AppDelegate.cpp->applicationDidFinishLaunching method

I’ve been trying to replace the default HelloWorld::scene() but to no avail.
I already create .h and .cpp but it says.

C:/Dev/Android/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/…/lib/gcc/arm-linux-androideabi/4.6/…/…/…/…/arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs-debug/game_shared///Classes/AppDelegate.o: in function AppDelegate::applicationDidFinishLaunching():jni/…/…/Classes/AppDelegate.cpp:94: error: undefined reference to ‘MainMenu::scene()’

But I already created my MainMenu::scene… already reference it in the include.
Pls. help :frowning:

From the error it is looking like you are trying to make Android build. You need to tell the compiler to compile your newly added file MainMenu.cpp,
You can do it by adding MainMenu.cpp into Android.mk file, go to your Android project, then go to jni folder and open Android.mk and add your MainMenu.cpp in to
LOCAL_SRC_FILES. Try to build your project. Hope it will help you, let me know if you face any problem.

sorry for late reply.
I got busy during the week.

I did what you told and it works.
Thanks a lot, really appreciate it :slight_smile: