在Yosemite,Xcode 6.1下Swift编程Undefined symbols for architecture arm64报错解决

接收同事一个未做完的项目,checkout下来后编译(直接跑的workSpace文件),出现奇怪的某些库不支持64位架构的链接错误,一直以为是该库不支持64位架构,但是取消该库关联后仍然出现其他库也不支持64位架构的情况,但是在我印象中那些库都是支持的,遂感觉非常奇怪。例如下面显示的谷歌分析库不支持64位架构。

Undefined symbols for architecture arm64:
  "_sqlite3_close", referenced from:
      -[TAGDataLayerPersistentStoreImpl closeDatabase] in libGoogleAnalyticsServices.a(TAGDataLayerPersistentStoreImpl.o)
  "_sqlite3_prepare_v2", referenced from:
      -[TAGDataLayerPersistentStoreImpl prepareSql:description:] in libGoogleAnalyticsServices.a(TAGDataLayerPersistentStoreImpl.o)
  "_sqlite3_bind_int", referenced from:
      -[TAGDataLayerPersistentStoreImpl deleteEntries:] in libGoogleAnalyticsServices.a(TAGDataLayerPersistentStoreImpl.o)
  "_sqlite3_column_int64", referenced from:
      -[TAGDataLayerPersistentStoreImpl peekEntryIds:] in libGoogleAnalyticsServices.a(TAGDataLayerPersistentStoreImpl.o)
      -[TAGDataLayerPersistentStoreImpl numStoredEntries] in libGoogleAnalyticsServices.a(TAGDataLayerPersistentStoreImpl.o)
  "_sqlite3_bind_int64", referenced from:
      -[TAGDataLayerPersistentStoreImpl writeEntriesToDatabase:expireTime:] in libGoogleAnalyticsServices.a(TAGDataLayerPersistentStoreImpl.o)
      -[TAGDataLayerPersistentStoreImpl peekEntryIds:] in libGoogleAnalyticsServices.a(TAGDataLayerPersistentStoreImpl.o)
      -[TAGDataLayerPersistentStoreImpl deleteEntriesOlderThan:] in libGoogleAnalyticsServices.a(TAGDataLayerPersistentStoreImpl.o)
  "_sqlite3_column_bytes", referenced from:
      -[TAGDataLayerPersistentStoreImpl loadSerialized] in libGoogleAnalyticsServices.a(TAGDataLayerPersistentStoreImpl.o)
  "_sqlite3_open", referenced from:
      -[TAGDataLayerPersistentStoreImpl openDatabaseAndInitStatements] in libGoogleAnalyticsServices.a(TAGDataLayerPersistentStoreImpl.o)
  "_sqlite3_reset", referenced from:

上stackover查找原因(百度太弱了,还是老外强大),很多都说可能是cocoapods不是最新啊,好,那就更新到最新,还是不行;有些说需要卸载cocoapods然后重新装一次,还是不行啊;那就从源头开始试试,既然不支持64位,那我就update最新的谷歌分析库吧,在profile文件中将 谷歌分析部分改成   pod 'GoogleAnalytics-iOS-SDK'   默认拉取最新的库,编译。。。该错误再次出现,抓狂中,,,没办法了,继续stackover,终于找到了有类似遭遇的,,哈哈~遂试试看,没有链接错误了,,,但是蹦出新错误,,,
Code Sign error: No matching provisioning profiles found: None of the valid provisioning profiles allowed the specified entitlements: com.apple.security.application-groups.,ok,这种错误一看就知道是账号问题啦,由于使用了App Extesion 功能,那么取消App Groups 关联,重新关联一下,编译通过。

原版回答:

I have Updated on Yosemite, Xcode 6.1. I have updated gem xcodeproj (0.19.4) and cocoapods (0.34.4).

I have resolve my conflict by :

Clearing the Library/Developer/Xcode/DerivedData folder

replace in Target -> Build Settings -> Linking -> Other Linker Flags : $(OTHER_LDFLAGS)

Check in Target -> Build Phases -> Copy Pods Resources : "${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh"

另:老外还给出了xcode 编译swift 程序流程,mark一下~

参见地址:http://stackoverflow.com/questions/25765352/xcode-6-linker-error-undefined-symbols-for-architecture-armv7

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值