2017-07-14 42 views
0

所以我用macOS Sierra 10.12.5安裝了這個新的iMac。我安裝了Xcode 8並進行了brew。然後,我通過brew安裝了OpenSSL:包含Xcode 8 Brew中的OpenSSL庫項目

brew install openssl 
brew link --force openssl 

--force不再起作用。顯然,我需要根據brew info openssl

For compilers to find this software you may need to set: 
LDFLAGS: -L/usr/local/opt/openssl/lib 
CPPFLAGS: -I/usr/local/opt/openssl/include 

所以,問題是我在哪裏把這些標誌在Xcode中設置一些標誌?

+0

[Xcode中什麼是與「Other_LDFLAGS」「其他鏈接器標記」的區別( https://stackoverflow.com/q/13022084/608639),[通過命令行設置「OTHER_LDFLAGS」](https:// stackoverf (https://stackoverflow.com/q/13449915/608639),[在命令行中使用OTHER_LDFLAGS](https:/http://www.stackoverflow.com/q/13449915/608639) /stackoverflow.com/q/25402740/608639),[在Makefile中通過LDFLAGS加載zlib的正確方法](https://stackoverflow.com/q/10060938/608639)等等。 – jww

回答

-1

實際上,通過設置

xcode->targets->build settings->other linker flags 

-L/usr/local/opt/openssl/lib 

和設置

xcode->targets->build settings-> 

標題搜索路徑

/usr/local/opt/openssl/include 

xcode將成功爲您工作。

我的設置。

頭搜索路徑:

Header search path

其他連接標誌:

Other linker flags