Write DH key exchange with OpenSSL under Xcode and encounter "Ld:library not found For-lcrypto" issue (Resolved)

Source: Internet
Author: User
Tags openssl openssl library

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:


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.