This afternoon with Xcode to write a very simple Diffie-hellman key exchange code, reference to a bunch of data, excluding the logic and grammar of the error will still be compiled however, there is a problem, the problem screenshot is as follows:
Always prompt "Ld:library not found For-lcrypto" & "Linker command failed with exit code 1"
Then in Google search, in #xhe_tmpurl http://www.cnblogs.com/zhulin/archive/2011/12/04/2275205.html found a solution to the problem, the screenshot is as follows:
And then I thought about it. Xcode has been prompted to find a link library, just add the link to the OpenSSL library file, as shown below:
And it must be noted that the "header search Paths" and "Library search Paths" path is different, such as in my OpenSSL, the header files are saved in the Include folder, and the library file is in the Lib folder, the following image: