Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: unknown argument: '-suppress-warnings' #23

Closed
quhongjun opened this issue Mar 1, 2017 · 6 comments
Closed

error: unknown argument: '-suppress-warnings' #23

quhongjun opened this issue Mar 1, 2017 · 6 comments

Comments

@quhongjun
Copy link

您好!我是新手,编译时发现两个错误,都是一样的错误,发生在编译BSGridCollectionViewLayout 和Alamofire的时候。请问博主知道是什么原因吗?谢谢!
:0: error: unknown argument: '-suppress-warnings'
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1

@hilen
Copy link
Owner

hilen commented Mar 2, 2017

你的 CocoaPods 版本号? 使用的是哪个 pod 源?

@quhongjun
Copy link
Author

你好!我的pod版本是1.2.0.

pod源是这样:
ququs-Mac:~ hqu$ pod repo
master

@hilen
Copy link
Owner

hilen commented Mar 2, 2017

#22 https://rubygems.org/ 的源在国内速度不行。你可以使用通过 gem sources --add https://gems.ruby-china.org/ --remove https://rubygems.org/ 来使用 https://gems.ruby-china.org/ 的源

@quhongjun
Copy link
Author

谢谢博主回复!我是在国外,pod下载没有问题。我手动运行swiftc带上 -suppress-warnings 参数,它提示同样的错误。所以应该是xcode不支持 "-suppress-warnings" 这个选项。这就很奇怪了。不知道各位是否遇到过类似的问题?小弟是刚刚接触xcode开发,对此一窍不通。我用的xcode版本是7.0。swiftc版本是2.0. 用vmware虚拟机运行OS X 10.10。

@hilen
Copy link
Owner

hilen commented Mar 3, 2017

哦,Xcode 7 应该是不行的,这个工程需要 Xcode 8 以上。另外 -suppress-warnings 这个选项我没有什么经验。你可以更新到 Xcode 8 试试。

@quhongjun
Copy link
Author

好的,非常感谢博主!!

@hilen hilen closed this as completed Mar 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants