Reputation: 6682
I am developing a cocos2d-x project on Xcode. I create a Scene and I met this error:
Undefined symbols for architecture x86_64:
"MainScene::scene()", referenced from:
Splash::finishSplash(float) in Splash.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have searched for quite a while and see a lot of solutions. But I am still confused about the error. Sometimes I met the x86_64
error and sometimes met the i386
error. I am new to iOS develop. So how can I solve the problem?
I have tried following, but errors still come out:
i386
and arm64
in Valid Architectures
Header Search Paths
Linked Frameworks and libraries
I am using cocos2d-x 2.2.6 cpp. Xcode Version 6.3.2 (6D2105). I used the python script to create this iOS project.
Upvotes: 1
Views: 3400
Reputation: 13
This is a 64-bit error.
Cocos2d-x2.2.6 has 64-bit support so you should not remove arm64 from architecture.
Or please submit more code/logs so i can help you better.
Upvotes: 0
Reputation: 7521
I had similar problem. I use following configuration (on cocos2d-x 3.x but it should be the same on 2.x):
On root project:
Build Active Architecture Only - Yes (Debug), No (Release). Valid Architectures: armv7, armv7s, i386, x86_64, arm64.
On cocos2d_libs project:
Build Active Architecture No. Valid Architectures: armv7, armv7s, i386, x86_64, arm64.
You should also update to the latest Xcode (it may be not soon possible to send an app on Xcode 6.x to the app store) and cocos2d-x (it's easier than 2.x).
Upvotes: 1