Q:

Cannot compile for iOS after XCode upgrade

Greetings!
Since reinstalling XCode this morning, I have been unable to compile any iOS project. Mac OS targets work perfectly fine, but iOS targets just refuses to work. Even the templates included with XCode refuses to compile.
Now, this is probably where I should include my error messages. The problem here is that just the plain templates will output 14300 errors. These errors do not come from the files in the project, they come from math.h, signal.h, stddef.h, stdlib.h, time.h, CFBase.h, CFArray.h and a number of other built in headers. The errors are too many and too different to name, but a lot of them seem to be in this form:

Expected * before * : CFBitVector.h:17: error: expected '=', ',', ';', 'asm' or 'attribute' before 'CFBitVectorGetTypeID'
Expected * before * : /math.h:470: error: expected declaration specifiers before '__AVAILABILITY_INTERNAL__IPHONE_3_2'
GCC 4.2 Error : m/math.h:477: error: storage class specified for parameter 'scalb'

There is an error in one of the project-files: Viewer-Prefix.pch. The file looks like this:
#import <Availability.h>

#ifndef __IPHONE_3_0
#warning "This project uses features only available in iPhone SDK 3.0 and later."
#endif

#ifdef __OBJC__
    #import <UIKit/UIKit.h>
    #import <Foundation/Foundation.h>
#endif

The line with "#import " gives these exact errors:

Expected '{' at end of input
Old-style parameter delcarations in prototyped function definition
Old-style parameter delcarations in prototyped function definition
Expected '{' at end of input

The current version of XCode is 4.0.2, and iPhone SDK is 4.3. I believe I upgraded from XCode 4.0.0, the first one that came out. As I only get these error messages when compiling for iOS, I thought there might be a problem with my SDK's. System Profiler lists the following SDK's as installed:
Mac OS X: 10.6: (4A2002a)
iPhone OS: 4.3: (8H7)
iPhone Simulator:
  3.2:  (7W367a)
  4.0:  (8A400)
  4.1:  (8B117)
  4.2:  (8C134)
  4.3:  (8H7)
Bottom line: I have no idea where to start. I have never had any errors outside any project files, and I have a hard time believing that there are in fact 14300 errors.
Extra facts: 

Base SDK: Last iOS (iOS 4.3)
Architectures: Standard (armv6 armv7)
Platforms: iphonesimulator iphoneos
Mac OS X Deployment Target: Compiler Default
iOS Deployment Target: iOS 4.3
C/C++ Compiler Version: LLVM GCC 4.3

A:

Allright, it seems I was the cause of my own problem here. I named the new project "Viewer", and it seems that the name of the project was causing problems. The reason older project did not compile was because I had this "Viewer" project open, and this eventually crashed XCode.
I am curious as to why this happened. One theory is that this creates files with the same name as some of the SDK files, but I do not know to be honest. It would also be interesting to know if any other project names will produce the same results.

