Linker error: ld: symbol(s) not found for architecture x86_64

久未见 提交于 2020-01-25 09:41:20

问题


I'm trying to run my UITests target in Xcode 9.1. The actual app runs, but the UITests target is giving me this error. I've tried restarting, reinstalling pods, updating pods, changing various build settings, deleting and relinking frameworks. Any ideas?

Undefined symbols for architecture x86_64: "__T010LearnerLog8DurationCMa", referenced from: __T017LearnerLogUITests21testAddPreviousDrivesC0deF5DriveyyF in testAddPreviousDrives.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Let me know if you need any more info!

Edit It happens when I uncomment the second line here. With it commented out it runs fine.

let realm = try! Realm() //Connect to realm
//print(realm.objects(Journey.self))

回答1:


Turns out you can't do many things in UITests...one of which is Realm.



来源:https://stackoverflow.com/questions/47447121/linker-error-ld-symbols-not-found-for-architecture-x86-64

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!