This error is only produced when the scheme set to Distribution and not Debug. Any ideas?
ld: duplicate symbol _OBJC_CLASS_$_TouchTrailLayer in
/Users/myname/Library/Developer/Xcode/DerivedData/Flashlight-gmurejxadxglkncisufsozykekdz/Build/Products/Distribution-iphoneos/libcocos2d
libraries.a(TouchTrailLayer.o) and
/Users/myname/Library/Developer/Xcode/DerivedData/Flashlight-gmurejxadxglkncisufsozykekdz/Build/Intermediates/Flashlight.build/Distribution-iphoneos/Flashlight.build/Objects-normal/armv7/TouchTrailLayer.o
for architecture armv7Command
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/clang++
failed with exit code 1
It looks like you’ve included
cocos2d‘s source files in your project but also linked againstlibcocos2dlibraries. You should remove the source files forcocos2dfrom your project if you’re linking to the.a.