I have a project in Xcode 4 (the latest non-beta version) that builds fine when built in Xcode itself. Specifically, the Ld command correctly uses the derived data directory (wh
If you look at the log of the build, asking to see all messages, you should see a terse line that says "link ..." that has little in the way of details. However if you right click that line and select "expand all transcripts" you get a very detailed line telling you what command was issued from within XCode.
That should help you to debug the issue.
Dave