xcode4: Linker error: Directory not found for option

前端 未结 4 1526
难免孤独
难免孤独 2020-12-13 05:53

I\'m getting this error for my profile build (debug build was OK).

{Directory not found for option \'-L../../../Mac/Profile/lib [full path of that directory]         


        
4条回答
  •  失恋的感觉
    2020-12-13 06:34

    I came across this error in seemingly a completely different scenario from those answers above. Hopefully some people will do what I did and find this useful even if it is a rare occurence.

    I managed to get this error after having just added a new viewController to my project. As normal I added a tableview and constrained it then added and linked the delegate and datasource. I also created a property.

    The weird thing that I then noticed was that as soon as I finished creating the property it was immediately linked, as if I had linked it, but before I linked it. When I clicked on the xib file and checked the links it wasn't in fact linked to the table view.

    enter image description here

    (This link appeared automatically without me needing to create it myself)

    I don't know why this happened. I deleted the file and remade it with the same name but it just happened again. Giving me this error above.

    The way I solved it was to create a new file, different name, and added and created the links in a different order checking at each step that this hadn't occurred. After doing this no linked created themselves and it worked.

    TL DR: If you are getting this error and have recently added new view controller then check if deleting it works and if so they remake it being careful about any automatic links.

提交回复
热议问题