Sunday, November 7, 2010

Linking .a library with XCode

Open the Info page for your Target (right-click on the target's node and choose Get Info) and locate the Library Search Path option. It (possibly amongst other folders) contains a reference to the folder you just dragged the libRemObjectsSDK.a from, such as "/Developer/RemObjects Software/Bin/iOS/Debug-iphoneos". To make switching between different platforms and configurations easier, select Configuration: All Configurations at the top of the dialog, and adjust the Library Search Path to replace "Debug-iphoneos" (or whatever other configuration/combination it currently shows) with "$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)", so that the full folder name looks something like:

/Developer/RemObjects Software/Bin/iOS/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
This way, Xcode will automatically pick the right version of libRemObjectsSDK.a or libDataAbstract.a, regardless of whether you build Debug or Release, or whether you are working with the Simulator or on the real device.

See full article