Q:

Undefined symbols for architecture x86_64 when trying to unit test the application

I'm getting an error in XCode when trying to run unit tests. Any ideas?
I have tried changing the Framework search paths in Build Settings to $(SDKROOT)/Developer/Library/Frameworks
$(DEVELOPER_LIBRARY_DIR)/Frameworks
But that did not change anything.
ld: warning: directory not found for option '-F/Applications/Xcode'

ld: warning: directory not found for option '-
F4.3.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/Developer/Library/Frameworks'

ld: warning: directory not found for option '-F/Applications/Xcode'

ld: warning: directory not found for option '-F4.3.2.app/Contents/Developer/Library/Frameworks'

ld: warning: ignoring file /Applications/Xcode 4.3.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks//SenTestingKit.framework/SenTestingKit, file was built for unsupported file format which is not the architecture being linked (x86_64)

Undefined symbols for architecture x86_64:
  "_STComposeString", referenced from:
      -[AddressBookFrameworkSyncHelperTest testAddingAPersonToGroupsFromAVcard] in AddressBookFrameworkSyncHelperTest.o
      -[SyncTesting testExample] in SyncTesting.o
  "_OBJC_CLASS_$_SenTestCase", referenced from:
      _OBJC_CLASS_$_AddressBookFrameworkSyncHelperTest in AddressBookFrameworkSyncHelperTest.o
      _OBJC_CLASS_$_SyncTesting in SyncTesting.o
  "_OBJC_CLASS_$_AddressBookFrameworkSyncHelper", referenced from:
      objc-class-ref in AddressBookFrameworkSyncHelperTest.o
     (maybe you meant: _OBJC_CLASS_$_AddressBookFrameworkSyncHelperTest)
  "_OBJC_METACLASS_$_SenTestCase", referenced from:
      _OBJC_METACLASS_$_AddressBookFrameworkSyncHelperTest in AddressBookFrameworkSyncHelperTest.o
      _OBJC_METACLASS_$_SyncTesting in SyncTesting.o

ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)

A:

These error messages show the problem:

ld: warning: directory not found for option '-F/Applications/Xcode'
ld: warning: directory not found for option '-F4.3.2.app/Contents/Developer/Library/Frameworks'

Clearly you've got "/Applications/Xcode" and "4.3.2.app/Contents/Developer/Library/Frameworks" on your frameworks paths separately, instead of "/Applications/Xcode 4.3.2.app/Contents/Developer/Library/Frameworks".
If this is something you did, you're probably missing quotes somewhere. Maybe just doing the exact same thing you tried, but with quotes around it, will work?
If it's something that Xcode is doing automatically, Apple's missing quotes somewhere, and the workaround is probably to rename your "Xcode 4.3.2.app" to something without spaces in it.
But there may be a second problem here as well:

ld: warning: ignoring file /Applications/Xcode 4.3.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks//SenTestingKit.framework/SenTestingKit, file was built for unsupported file format which is not the architecture being linked (x86_64)

In this case, the quotes are right, and it's finding the framework… but apparently you've only got the 32-bit (i386) build installed, not the 64-bit (x86_64) one that you need.
I'm also a bit curious where this came from in the first place, as when I look at the 10.6 SDK in my Xcode 4.3.2, there's no framework called SenTestingKit.framework. Which implies that you may have hacked up your Xcode install in various ways, and the right solution might be to uninstall, reinstall, and do things properly. But it's possible this is some additional install from within Xcode (or from developer.apple.com) that you've installed and I haven't.

