Release Target Incorrect Settings

After downloading cocos2d-0.99.5-x-0.8.0 and installing the xcode templates, I’ve got some errors.

Steps:

1 - Build a new project from basic template.
2 - Set target to Device.
3 - Debug build runs fine, but Release won’t build with many errors (listed at http://pastebin.com/r1aqfsDa)

Seems there is something wrong with the build settings. I’ve tried to copy the settings from Debug to Release to no avail.

What should I change in order to compile this in Release mode?

Sorry. Others also report this bug #401
We make a mistake in the “header serach paths” of templates. I will fix it today.
Thanks for your report all the same!