I have my app running and tested on 10.7 but later realized that I needed it to work on earlier versions as well. And unfortunately, I started this project with ARC on from the very beginning.
Now my build setup is debug base sdk: 10.7, and release base sdk: 10.6. And when I try to archive my app, I got the following error:
Undefined symbols for architecture x86_64:
"_objc_retain", referenced from:
+[__ARCLite__ load] in libarclite_macosx.a(arclite.o)
-[AppDelegate applicationDidFinishLaunching:] in AppDelegate.o
-[AppDelegate managedObjectModel] in AppDelegate.o
-[AppDelegate persistentStoreCoordinator] in AppDelegate.o
-[AppDelegate managedObjectContext] in AppDelegate.o
-[AppDelegate windowWillReturnUndoManager:] in AppDelegate.o
-[AppDelegate saveAction:] in AppDelegate.o
...
(maybe you meant: _objc_retainedObject)
"_objc_release", referenced from:
-[AppDelegate applicationDidFinishLaunching:] in AppDelegate.o
-[AppDelegate applicationFilesDirectory] in AppDelegate.o
-[AppDelegate managedObjectModel] in AppDelegate.o
-[AppDelegate persistentStoreCoordinator] in AppDelegate.o
-[AppDelegate managedObjectContext] in AppDelegate.o
-[AppDelegate windowWillReturnUndoManager:] in AppDelegate.o
-[AppDelegate saveAction:] in AppDelegate.o
...
"_objc_retainAutoreleasedReturnValue", referenced from:
-[AppDelegate applicationFilesDirectory] in AppDelegate.o
-[AppDelegate managedObjectModel] in AppDelegate.o
-[AppDelegate persistentStoreCoordinator] in AppDelegate.o
-[AppDelegate managedObjectContext] in AppDelegate.o
-[AppDelegate windowWillReturnUndoManager:] in AppDelegate.o
-[AppDelegate saveAction:] in AppDelegate.o
-[AppDelegate applicationShouldTerminate:] in AppDelegate.o
...
"_objc_autoreleaseReturnValue", referenced from:
-[AppDelegate applicationFilesDirectory] in AppDelegate.o
-[AppDelegate managedObjectModel] in AppDelegate.o
-[AppDelegate persistentStoreCoordinator] in AppDelegate.o
-[AppDelegate managedObjectContext] in AppDelegate.o
-[AppDelegate windowWillReturnUndoManager:] in AppDelegate.o
-[MainWindowController viewForTag:] in MainWindowController.o
-[MainWindowController tableView:objectValueForTableColumn:row:] in MainWindowController.o
...
"_objc_storeStrong", referenced from:
-[AppDelegate persistentStoreCoordinator] in AppDelegate.o
-[AppDelegate saveAction:] in AppDelegate.o
-[AppDelegate applicationShouldTerminate:] in AppDelegate.o
-[AppDelegate .cxx_destruct] in AppDelegate.o
-[MainWindowController init] in MainWindowController.o
-[MainWindowController viewForTag:] in MainWindowController.o
-[MainWindowController showUserFinderView:] in MainWindowController.o
...
"_objc_retainAutoreleaseReturnValue", referenced from:
+[MainWindowController sharedInstance] in MainWindowController.o
-[FileMetaData getFileName] in FileMetaData.o
-[FileMetaData getLastHash] in FileMetaData.o
-[FileMetaData getCreationDate] in FileMetaData.o
-[FileMetaData getLastModified] in FileMetaData.oe
-[FileMetaData getLocalPath] in FileMetaData.o
...
"_objc_autorelease", referenced from:
-[SBJsonParser objectWithString:error:] in SBJsonParser.o
-[SBJsonTokeniser getStringToken:] in SBJsonTokeniser.o
-[SBJsonTokeniser getNumberToken:] in SBJsonTokeniser.o
-[SBJsonUTF8Stream getRetainedStringFragment:] in SBJsonUTF8Stream.o
-[SBJsonWriter stringWithObject:error:] in SBJsonWriter.o
"_objc_retainAutorelease", referenced from:
-[SBJsonTokeniser getStringToken:] in SBJsonTokeniser.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
It looks like an issue with ARC, but I have no clue where to start on fixing this. Any suggestions? Thanks.