Linker command failed with exit code 1 error in Xcode project

后端 未结 21 3117
死守一世寂寞
死守一世寂寞 2021-02-13 06:44

I was working on my project and suddenly after editing the code and compiling gave this error:

ld: warning: directory not found for option \'-
L/Use

相关标签:
21条回答
  • 2021-02-13 07:16

    Check playSiew.m is in Compile Sources section. isn't it?

    You can find Compile Sources section follow this step

    1. Select YourProjectName
    2. Select TARGETS
    3. Select Build Phases

    If don't have playSiew.m in this section . You must to add it to this section.

    0 讨论(0)
  • 2021-02-13 07:17

    You may be accidentally #import'ing a .m file instead of a .h. Use Cmd+Shift+F and search for ".m" (without quotes). It will most likely lie in one of the classes mentioned in the warning. If not, clean and run again.

    0 讨论(0)
  • 2021-02-13 07:19

    For me it was different. I had the same error when I removed a Pod and solved it by removing this pod from the Other Linker Flags in the Build Settings

    then clean your project [Product > Clean] and rebuild

    0 讨论(0)
  • 2021-02-13 07:21

    As I said the problem wasn't the code but some settings. So what I did was copying the code from my friends' Mac (it was working fine), and installed a fresh copy of the project to my Mac. It worked.

    0 讨论(0)
  • 2021-02-13 07:22

    the same error i faced. so, i just removed reference of that classes which are generating the errors and than again gave reference and the error was gone...

    as D80Buckeye says there should be problem of dragging and dropping files instead of Clicking on "Add Files"

    0 讨论(0)
  • 2021-02-13 07:23

    Cleaning the project not works for me. Restart the Xcode works for me...

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