Setting C compile flags in xcode

烈酒焚心 提交于 2020-07-19 11:17:08

问题


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:


回答1:


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"



来源:https://stackoverflow.com/questions/51715807/setting-c-compile-flags-in-xcode

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!