Xcode linker problem

Xcode linker problem
0.0 0



I was using win32 template for weeks, and now is the time to migrate to Xcode template but I have a linker problem:

Undefined symbols for architecture i386:
“Level::scene()”, referenced from:
AppDelegate::applicationDidFinishLaunching() in AppDelegate.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

If I use HelloWorldScene.h it works fine, but if I change with Level.h It returns this error…

(Sorry for my english)

Thank you


You need add your files to xcode compilation file list.

1 - Click on your project
2 - Click on TAB “Build Phases”
3 - Click on SECTION “Compile Sources”
4 - Scroll the file list to bottom
5 - Click on “+” button (plus button)
6 - Add your files that dont be on list

Try compile again.

[qualquer coisa fala comigo em português]


Thank you! it works :D!