I had the same error and it occurs that the explanation was rather simple - in my Compile Sources in Build Phases I didn't have any file. When I add my main.cpp file everything started to work correctly