Error building app with objective c google gtl library

So I recently started working on building an iPad application. I linked up the google gtl library for objective c and I got a long list of these wonderful compiler errors.

“Undefined symbols for architecture i386:

“_SecItemCopyMatching”, referenced from:

-[GTMOAuth2Keychain passwordForService:account:error:] in libGTLTouchStaticLib.a(GTMOAuth2ViewControllerTouch.o)

“_SecItemDelete”, referenced from:

-[GTMOAuth2Keychain removePasswordForService:account:error:] in libGTLTouchStaticLib.a(GTMOAuth2ViewControllerTouch.o)

“_SecItemAdd”, referenced from:

-[GTMOAuth2Keychain setPassword:forService:accessibility:account:error:] in libGTLTouchStaticLib.a(GTMOAuth2ViewControllerTouch.o)

“_kSecAttrAccessible”, referenced from:

-[GTMOAuth2Keychain setPassword:forService:accessibility:account:error:] in libGTLTouchStaticLib.a(GTMOAuth2ViewControllerTouch.o)

“_kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly”, referenced from:

+[GTMOAuth2ViewControllerTouch saveParamsToKeychainForName:accessibility:authentication:] in libGTLTouchStaticLib.a(GTMOAuth2ViewControllerTouch.o)

“_kSecAttrAccount”, referenced from:

+[GTMOAuth2Keychain keychainQueryForService:account:] in libGTLTouchStaticLib.a(GTMOAuth2ViewControllerTouch.o)

“_kSecAttrGeneric”, referenced from:

+[GTMOAuth2Keychain keychainQueryForService:account:] in libGTLTouchStaticLib.a(GTMOAuth2ViewControllerTouch.o)

“_kSecAttrService”, referenced from:

+[GTMOAuth2Keychain keychainQueryForService:account:] in libGTLTouchStaticLib.a(GTMOAuth2ViewControllerTouch.o)

“_kSecClass”, referenced from:

+[GTMOAuth2Keychain keychainQueryForService:account:] in libGTLTouchStaticLib.a(GTMOAuth2ViewControllerTouch.o)

“_kSecClassGenericPassword”, referenced from:

+[GTMOAuth2Keychain keychainQueryForService:account:] in libGTLTouchStaticLib.a(GTMOAuth2ViewControllerTouch.o)

“_kSecMatchLimit”, referenced from:

-[GTMOAuth2Keychain passwordForService:account:error:] in libGTLTouchStaticLib.a(GTMOAuth2ViewControllerTouch.o)

“_kSecMatchLimitOne”, referenced from:

-[GTMOAuth2Keychain passwordForService:account:error:] in libGTLTouchStaticLib.a(GTMOAuth2ViewControllerTouch.o)

“_kSecReturnData”, referenced from:

-[GTMOAuth2Keychain passwordForService:account:error:] in libGTLTouchStaticLib.a(GTMOAuth2ViewControllerTouch.o)

“_kSecValueData”, referenced from:

-[GTMOAuth2Keychain setPassword:forService:accessibility:account:error:] in libGTLTouchStaticLib.a(GTMOAuth2ViewControllerTouch.o)

ld: symbol(s) not found for architecture i386

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

(Im hoping shoving the whole thing in here will help people find this on google when they make the same stupid mistake I did)

So I thought the gtl library wasn’t building correctly for the iPad simulator and spent a little while changing build options for that. Nope turns out I skipped a step in the setup guide and I just needed to reference SystemConfiguration.framework and Security.framework in my app. It doesn’t really make sense to me that you have to have these referenced in the gtl project and your application project but the Mac users seemed flabbergasted when I wanted a maximize button that actually maximized the damn window so I guess I just don’t understand this Mac world.

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply