osx - Is header importing broken in Xcode 4? -


i made jump xcode 2 xcode 4 , discovered header importing doesn't work. e.g. if make header file defines single variable, foo, import header class a.h , class b.h app fails compile 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 architecture x86_64 -clang: error: linker command failed exit code 1 (use -v see invocation) 

wtf? it's xcode 4 doesn't know import means. how fix this?

try make sure didn't #import/#include code files, make sure checked on right hand column building, , ensure don't externally link them @ later stage.

if absolutely need import/include code files, uncheck file building in right hand column.

hope helps.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -