I am using Xcode 3.2.6 on MacBook, Xcode 4.0.2 on iMac. After I came back home, I checked it. As you said it build successfully. I think Xcode 4.0.2 is smarter than 3.2.6 and automatically correcting the configuration.
You uploaded the new updated sample code just a few hours ago. Thanks for quick response.