Linker error: undefined symbols, symbols not found

后端 未结 3 1501
迷失自我
迷失自我 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: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

提交回复
热议问题