Recently, I switched to Xcode4 and when I compile my project I got following error.
ld: warning: ignoring file /Users/myname/Library/Developer/Xcode/DerivedD
I tried all the options above and none worked.
This is the right answer:
simply dragging a framework in your project won't link it properly (or something along these lines, in any case)
what you need to do is select the framework you want to add in Build Phases (click on your project's blue icon, then select your project's name under Targets, then the tab Build Phases), see here for more reference.