‘ld: warning: directory not found for option’

2018-12-31 16:57发布

When I'm building my Xcode 4 apps I'm getting this warning:

ld: warning: directory not found for option '-L/Users/frenck/Downloads/apz/../../../Downloads/Google Analytics SDK/Library'
ld: warning: directory not found for option '-L/Users/frenck/Downloads/apz/../Google Analytics SDK/Library'

But I do not have Google Analytics in my app, I deleted all of it how can I remove the error? And archiving an app gives me the error:

clang: error: no such file or directory: 'armv6'
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1

I've tried so many things but I'm still getting this error when I'm trying to make an .IPA file

标签: xcode
24条回答
倾城一夜雪
2楼-- · 2018-12-31 17:34

For me the problem was a missing escape "\" character.

My search paths were broken up on several lines in the Library Search Paths. Conveniently, they were breaking at spaces in my path. Adding the escape "\" fixed it for me.

$(PROJECT_DIR)/My\ Project\ Name/My\ Directory
查看更多
零度萤火
3楼-- · 2018-12-31 17:34

Supplemental answer

All the answers said to either delete the Framework or Library search paths from the target. I had two problems:

  • First, I was looking at my main project target rather than the Unit Test target.
  • Second, I couldn't figure out how to delete the framework search path. It turned out that it was just clicking it to get in edit mode and then just deleting the string.
查看更多
何处买醉
4楼-- · 2018-12-31 17:35

I ran into the same problem (the first one) after an Xcode crash and none of the solutions proposed worked. To suppress the warning I have done:

• manage schemes...

• deleted the current scheme

• Autocrate Schemes Now

查看更多
忆尘夕之涩
5楼-- · 2018-12-31 17:36

There are two errors that people seem to be confusing.

If it is a "directory not found for option '-L/..." error, that means it's a Library Error, and you should try to:

  • Click on your project (targets)
  • Click on Build Settings
  • Under Library Search Paths, delete the paths

If it is a "directory not found for option '-F/...", that means it's a Framework Error, and you should try to:

  • Click on your project (targets)
  • Click on Build Settings
  • Under Framework Search Paths, delete the paths

This might happen when you move the referenced file around.

查看更多
高级女魔头
6楼-- · 2018-12-31 17:36

For me the problem seemed to be that I hadn't included the appropriate frameworks (when copying addons from another project I didn't copy the frameworks files as well)

查看更多
爱死公子算了
7楼-- · 2018-12-31 17:37

My problem was that I opened the original .xcodeproj instead of the .xcworkspace that was generated by CocoaPods.

查看更多
登录 后发表回答