ios Xcode 5- clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/21326995/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-30 23:14:30  来源:igfitidea点击:

Xcode 5- clang: error: linker command failed with exit code 1 (use -v to see invocation)

iosxcode

提问by Mohammad Nurdin

I'm using xcode 5 for my mobile app project. I got this error when I try build the project.

我正在将 xcode 5 用于我的移动应用程序项目。尝试构建项目时出现此错误。

    ld: warning: directory not found for option '-L\\\\"/Applications/MAMP/htdocs/rmbp/apps/rmbp/iphone/native/WorklightSDK\\\\"'
    ld: warning: directory not found for option '-L/Applications/MAMP/htdocs/rmbp/apps/rmbp/iphone/native/WikitudeSDK'
    ld: warning: directory not found for option '-F"/Applications/MAMP/htdocs/rmbp/apps/rmbp/iphone/native/Frameworks"'
    ld: warning: directory not found for option '-F/Applications/MAMP/htdocs/rmbp/apps/rmbp/iphone/native/WikitudeSDK'
    ld: framework not found sqlcipher
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

ld: warning: directory not found for option '-L\\\\"/Applications/MAMP/htdocs/rmbp/apps/rmbp/iphone/native/WorklightSDK\\\\"'


ld: warning: directory not found for option '-L/Applications/MAMP/htdocs/rmbp/apps/rmbp/iphone/native/WikitudeSDK'


ld: warning: directory not found for option '-F"/Applications/MAMP/htdocs/rmbp/apps/rmbp/iphone/native/Frameworks"'


ld: warning: directory not found for option '-F/Applications/MAMP/htdocs/rmbp/apps/rmbp/iphone/native/WikitudeSDK'


ld: framework not found sqlcipher


clang: error: linker command failed with exit code 1 (use -v to see invocation)

Why?

为什么?

回答by Manthan

This error is because of some missing libraries in your project.

此错误是因为您的项目中缺少一些库。

Check in your Build Phases-> Link Binary With Libraries. Any of your framework may had been removed from there.

签入您的Build Phases-> Link Binary With Libraries。您的任何框架都可能已从那里删除。

Add it and Clean and Build your project. It should work fine.

添加它并清理并构建您的项目。它应该可以正常工作。

Hope it helps you.

希望对你有帮助。

回答by lynulzy

There is another probability that you are using Cocoa Pods to install the library but not open the workspace (*.xcworkspace) file of the project after pod installwas successfully executed.

还有一种可能是你使用Cocoa Pods安装了库,执行成功*.xcworkspace后没有打开项目的workspace( )文件pod install