Linker error: undefined symbols, symbols not found

后端 未结 3 1500
迷失自我
迷失自我 2021-01-03 12:16

I\'m getting these Apple Mach-O Linker errors and I don\'t know how to read these things. I got these error after importing \"CLCredentialHeader.h\" and \"CLCredentialHeader

相关标签:
3条回答
  • 2021-01-03 12:30

    Make sure that SFHFKeychainUtils.m appears in the "Compile Sources" Build Phase for your build target. Sometimes, adding files to a project in Xcode doesn't add all implementation files to the appropriate targets.

    0 讨论(0)
  • 2021-01-03 12:38

    If above answers does not work for you then check you have added Security framework. If not then add it in Build Phase section of Targets. Should be fine then :)

    0 讨论(0)
  • 2021-01-03 12:41

    I get this sometimes when I drag and drop a class from another project and forget to mark "add to targets" in the window that pops up. I think this is a very legitimate question. The error messages are also not very intuitive. The solution is easy in XCode clicking on the project, and click on "Build Phases" and open the "Compile Source" then say "+". Here some pictures that say more then all the words.

    So if the error looks like this, it tells me DataAccess class is undefined.

    enter image description here

    I recognize this as a class I just dragged and dropped into the project. I add DataAccess.m to my project

    enter image description here

    Originally I could have avoided it by marking "Add to targets"

    enter image description here

    0 讨论(0)
提交回复
热议问题