Linker command failed with exit code 1 error in Xcode project

后端 未结 21 3529
死守一世寂寞
死守一世寂寞 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:30

    I tried several of the answers listed but none worked for me. I got the error after updating XCode (while it was still open which may have contributed to the problem)

    First, I deleted my Derived Data folder: XCode => Preferences => Locations => Double Click on arrow next to path indicating where the Derived Data folder is. Then "Move to Trash" I don't think that's what the problem was, but it's amazing how many times this has been an issue for me working on different problems.

    Second, I 'Quit' the simulator.

    Third, I 'Quit' XCode.

    Fourth, I opened up my project in XCode again and then did a Clean and Build (found in the Product menu)

    Fifth, I ran my project and it worked fine

提交回复
热议问题