Ok, my problem seems to be similar to this, and this, but following the answers, there is not helping me. This might be because I am using Xcode 5, before I upgraded to this
Sometimes that happens when you add files separately.
Make sure you have the Build name's check box checked on the "Target Membership" area in the Utilities pane.
The files for which it is throwing an error would have that check box unchecked hence it does not get included in the final build.
By checking this checkbox I got my problem solved. Thank DomandoCoder!