How to add OpenSSL to an Xcode project

后端 未结 3 426
星月不相逢
星月不相逢 2020-12-16 20:30

I am trying to port an application to mac OSX. It uses openssl. I am new to xcode and mac development. Do I need to compile and install openssl myself, or is there some equi

3条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-16 21:02

    1. Download source from openssl source .
    2. Extract compressed file into directory of your choice. .
    3. Open command line and go to that directory and type something similar to ./configure darwin64-x86_64-cc .
    4. Then type make depend .
    5. Then make install .
    6. Go to your Xcode project build settings. Under Header Search Paths add /usr/local/ssl/include and library search paths /usr/local/ssl/lib (or whatever install paths you chose in the configure step) .
    7. Still in build settings go to Linking and under other linker flags put -lssl -lcrypto

    You should be good to go now.

提交回复
热议问题