I have included the ScriptingBridge.framework in the target, and it currently shows under Link Binary with Libraries.
I generated a header using:
sdef "/Applications/Address Book.app" | sdp -fh –basename AddressBook
The header was generated ok. However, at compile time, I get the following error:
".objc_class_name_AddressBookPerson", referenced from:
literal-pointer@__OBJC@__cls_refs@AddressBookPerson in ServerController.o
The linking problem disappeared when I removed the offending line: asking a scriptable object for its class (AddressBookPerson).
I replaced the call to class with classForScriptingClass as shown below:
where "person" is the name of the class as specified in the scripting definition file generated by sdef.