Question

I'm working on a game that has cocos2d with ARC. The game builds & runs fine in Simulator, but when I build for device I get Apple Mac-O Linker Errors, saying that I'm missing the libraries for libcocos2d.a etc.

clang: error: no such file or directory: '/Users/aleksandartrpeski/Library/Developer/Xcode/DerivedData/jellyfish-fsomqwhqasishxcfzhgvccrdvzpt/Build/Products/Debug-iphoneos/libcocos2d.a'
clang: error: no such file or directory: '/Users/aleksandartrpeski/Library/Developer/Xcode/DerivedData/jellyfish-fsomqwhqasishxcfzhgvccrdvzpt/Build/Products/Debug-iphoneos/libCocosDenshion.a'
clang: error: no such file or directory: '/Users/aleksandartrpeski/Library/Developer/Xcode/DerivedData/jellyfish-fsomqwhqasishxcfzhgvccrdvzpt/Build/Products/Debug-iphoneos/libkazmath.a'
clang: error: no such file or directory: '/Users/aleksandartrpeski/Library/Developer/Xcode/DerivedData/jellyfish-fsomqwhqasishxcfzhgvccrdvzpt/Build/Products/Debug-iphoneos/liblibpng.a'

When I go to the folder where the file is missing I only see jellyfish.app.

I don't have much experience in this kind of issues & I'm not clear why this happens, I checked how to start the project from TinyTimGames & LearnCocos2D, still not clear what I'm doing wrong.

Was it helpful?

Solution

I've solved the issue, the builds for the binaries were somehow ignored by XCode because they were for another architecture, by settings the build settings for the cocos2d target Build For Active Architectures Only to NO, the issue dissapeared.

OTHER TIPS

Sounds like you'll have to add these libraries to the Link Binary With Libraries build phase.

See my tutorial on Enabling ARC for Cocos2D projects for details.

It's strange that it would work for the Simulator though, since it's using the same target. I wouldn't rule out that the device is incompatible, you'll have to have at least a 3rd generation (iPhone 3GS) device running iOS 4.0 or higher.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top