Unable to add the Objective-C client library to project

228 views
Skip to first unread message

Haoyan Geng

unread,
Jun 4, 2014, 4:12:09 PM6/4/14
to gdata-objec...@googlegroups.com
Hello,

I was trying to use the Objective-C client library to let my iOS app interact with Google Cloud Storage.  I followed the instruction on https://code.google.com/p/google-api-objectivec-client/wiki/BuildingTheLibrary to link the iOS static library to my project, but the project failed to build with error messages saying that there are undefined symbols for architecture i386.  I'm under the impression that since I'm building an iOS app, the i386 architecture should not be relevant here?  My project is an iOS app created using Xcode 5.1.1, and the static library (libGTLTouchStaticLib.a) was built for iOS device using the same Xcode environment.  Could anyone give me some hint on what's going on?

Below is the build output:

Ld /Users/geng/Library/Developer/Xcode/DerivedData/GCEPhotoUploader2-fzbucwxgnboubxawapaovlefbvxo/Build/Products/Debug-iphonesimulator/GCEPhotoUploader2.app/GCEPhotoUploader2 normal i386

cd /Users/geng/code/objc/GCEPhotoUploader2

export IPHONEOS_DEPLOYMENT_TARGET=7.1

export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk -L/Users/geng/Library/Developer/Xcode/DerivedData/GCEPhotoUploader2-fzbucwxgnboubxawapaovlefbvxo/Build/Products/Debug-iphonesimulator -L/Users/geng/code/objc/GCEPhotoUploader2 -L/Users/geng/Library/Developer/Xcode/DerivedData/GTL-ewmzprrtdybxschiplbnhiihbyuo/Build/Products/Debug-iphoneos -F/Users/geng/Library/Developer/Xcode/DerivedData/GCEPhotoUploader2-fzbucwxgnboubxawapaovlefbvxo/Build/Products/Debug-iphonesimulator -filelist /Users/geng/Library/Developer/Xcode/DerivedData/GCEPhotoUploader2-fzbucwxgnboubxawapaovlefbvxo/Build/Intermediates/GCEPhotoUploader2.build/Debug-iphonesimulator/GCEPhotoUploader2.build/Objects-normal/i386/GCEPhotoUploader2.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -ObjC -all_load -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=7.1 -framework CoreGraphics -framework UIKit -framework Foundation -lGTLTouchStaticLib -Xlinker -dependency_info -Xlinker /Users/geng/Library/Developer/Xcode/DerivedData/GCEPhotoUploader2-fzbucwxgnboubxawapaovlefbvxo/Build/Intermediates/GCEPhotoUploader2.build/Debug-iphonesimulator/GCEPhotoUploader2.build/Objects-normal/i386/GCEPhotoUploader2_dependency_info.dat -o /Users/geng/Library/Developer/Xcode/DerivedData/GCEPhotoUploader2-fzbucwxgnboubxawapaovlefbvxo/Build/Products/Debug-iphonesimulator/GCEPhotoUploader2.app/GCEPhotoUploader2




ld: warning: ignoring file /Users/geng/Library/Developer/Xcode/DerivedData/GTL-ewmzprrtdybxschiplbnhiihbyuo/Build/Products/Debug-iphoneos/libGTLTouchStaticLib.a, missing required architecture i386 in file /Users/geng/Library/Developer/Xcode/DerivedData/GTL-ewmzprrtdybxschiplbnhiihbyuo/Build/Products/Debug-iphoneos/libGTLTouchStaticLib.a (2 slices)

Undefined symbols for architecture i386:

"_OBJC_CLASS_$_GTLCollectionObject", referenced from:
_OBJC_CLASS_$_GTLStorageBucketAccessControls in GTLStorage_Sources.o
_OBJC_CLASS_$_GTLStorageBuckets in GTLStorage_Sources.o
_OBJC_CLASS_$_GTLStorageObjectAccessControls in GTLStorage_Sources.o
_OBJC_CLASS_$_GTLStorageObjects in GTLStorage_Sources.o
_OBJC_CLASS_$_GTLStorageObjects in GTLStorageObjects.o
_OBJC_CLASS_$_GTLStorageBucketAccessControls in GTLStorageBucketAccessControls.o
_OBJC_CLASS_$_GTLStorageObjectAccessControls in GTLStorageObjectAccessControls.o
...

"_OBJC_CLASS_$_GTLObject", referenced from:
_OBJC_CLASS_$_GTLStorageObject in GTLStorageObject.o
_OBJC_CLASS_$_GTLStorageObjectMetadata in GTLStorageObject.o
_OBJC_CLASS_$_GTLStorageObjectOwner in GTLStorageObject.o
_OBJC_CLASS_$_GTLStorageBucketAccessControl in GTLStorage_Sources.o
_OBJC_CLASS_$_GTLStorageBucketCorsItem in GTLStorage_Sources.o
_OBJC_CLASS_$_GTLStorageObjectAccessControl in GTLStorage_Sources.o
_OBJC_CLASS_$_GTLStorageBucket in GTLStorage_Sources.o
...

"_OBJC_CLASS_$_GTLQuery", referenced from:
_OBJC_CLASS_$_GTLQueryStorage in GTLStorage_Sources.o
_OBJC_CLASS_$_GTLQueryStorage in GTLQueryStorage.o
(maybe you meant: _OBJC_CLASS_$_GTLQueryStorage)

"_OBJC_CLASS_$_GTLService", referenced from:
_OBJC_CLASS_$_GTLServiceStorage in GTLStorage_Sources.o
_OBJC_CLASS_$_GTLServiceStorage in GTLServiceStorage.o
(maybe you meant: _OBJC_CLASS_$_GTLServiceStorage)

"_OBJC_METACLASS_$_GTLCollectionObject", referenced from:
_OBJC_METACLASS_$_GTLStorageBucketAccessControls in GTLStorage_Sources.o
_OBJC_METACLASS_$_GTLStorageBuckets in GTLStorage_Sources.o
_OBJC_METACLASS_$_GTLStorageObjectAccessControls in GTLStorage_Sources.o
_OBJC_METACLASS_$_GTLStorageObjects in GTLStorage_Sources.o
_OBJC_METACLASS_$_GTLStorageObjects in GTLStorageObjects.o
_OBJC_METACLASS_$_GTLStorageBucketAccessControls in GTLStorageBucketAccessControls.o
_OBJC_METACLASS_$_GTLStorageObjectAccessControls in GTLStorageObjectAccessControls.o
...

"_OBJC_METACLASS_$_GTLObject", referenced from:
_OBJC_METACLASS_$_GTLStorageObject in GTLStorageObject.o
_OBJC_METACLASS_$_GTLStorageObjectMetadata in GTLStorageObject.o
_OBJC_METACLASS_$_GTLStorageObjectOwner in GTLStorageObject.o
_OBJC_METACLASS_$_GTLStorageBucket in GTLStorage_Sources.o
_OBJC_METACLASS_$_GTLStorageBucketCorsItem in GTLStorage_Sources.o
_OBJC_METACLASS_$_GTLStorageBucketLifecycle in GTLStorage_Sources.o
_OBJC_METACLASS_$_GTLStorageBucketLogging in GTLStorage_Sources.o
...

"_OBJC_METACLASS_$_GTLQuery", referenced from:
_OBJC_METACLASS_$_GTLQueryStorage in GTLStorage_Sources.o
_OBJC_METACLASS_$_GTLQueryStorage in GTLQueryStorage.o
(maybe you meant: _OBJC_METACLASS_$_GTLQueryStorage)

"_OBJC_METACLASS_$_GTLService", referenced from:
_OBJC_METACLASS_$_GTLServiceStorage in GTLStorage_Sources.o
_OBJC_METACLASS_$_GTLServiceStorage in GTLServiceStorage.o
(maybe you meant: _OBJC_METACLASS_$_GTLServiceStorage)

ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)


Reply all
Reply to author
Forward
0 new messages