I just made the jump from Xcode 2 to Xcode 4 and discovered that header importing doesn't work. E.g. if I make a header file that defines a single variable, foo, then I import the header into Class A.h and Class B.h then my app fails to compile with the linker error:
duplicate symbol _foo in:
/Users/myself/Library/Developer/Xcode/DerivedData/Testcrap-grlgbsgwysjmmzagvozfywcwafar/Build/Intermediates/Testcrap.build/Debug/Testcrap.build/Objects-normal/x86_64/Class A.o
/Users/myself/Library/Developer/Xcode/DerivedData/Testcrap-grlgbsgwysjmmzagvozfywcwafar/Build/Intermediates/Testcrap.build/Debug/Testcrap.build/Objects-normal/x86_64/Class B.o
ld: 1 duplicate symbol for architecture x86_64
-clang: error: linker command failed with exit code 1 (use -v to see invocation)
WTF? It's like Xcode 4 doesn't even know what import means. How do I fix this?