在xcode中设置C编译标志 [英] Setting C compile flags in xcode
问题描述
我一直在尝试编译一些C文件,以在将Openssl用作加密依赖性的XCode中使用。使用clang编译时,代码可以正常编译。我在这里读了一些帖子,例如
XCode中的标记:
XCode中的错误:
由于@WhozCraig而解决方案
在页眉搜索中添加include文件夹路径和库搜索路径中的库文件夹
然后将-lcrypto放入其他链接标志下的文件
I've been trying to compile some C files to use in XCode that uses Openssl as a dependency for encryption. When compiling with clang the code compiles fine. I read a few posts on here like Setting C++ compile flags in xcode that says to put the flags under Other Linker Flags but I still couldn't get it to recognize it.
Here is the compiling command that works on the command line:
Flags in XCode:
The error in XCode:
Solution thanks to @WhozCraig
Add the include folder in "Header Search Paths" and library folder in "Library Search Paths"
Then put -lcrypto to link the files under "Other Link Flags"
这篇关于在xcode中设置C编译标志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!