简体   繁体   中英

Install libsodium on macOS

I am trying to incorporate libsodium into my C++ project in Xcode. I am following the Installation instructions here: https://libsodium.gitbook.io/doc/installation

However, I'm not sure where the "installed" files go on my machine or how to then incorporate them in my Xcode project. The libsodium website is not helpful. Could someone help clarify for me please?

I have downloaded the latest stable release, unzipped it, and typed the following code into the shell:

./configure
make && make check
sudo make install

It seems that the configure, make and install processes go smoothly. I expected the next steps to link to Xcode would be clear, but they are not, and I am lost. Can someone point me in the right direction?

When you perform the sudo make install step, the library files will be installed into the location the ./configure step designated. By default, this is usually /usr/local/lib .

You will still need to add the library files to your XCode project.

Try reading Link a target to libraries and frameworks about how to add the libsodium libraries. Pay attention to the "Add Other..." button which will allow you to navigate to the location you installed the libraries.

Hope this helps!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM