1

So I have this new iMac with macOS Sierra 10.12.5. I installed Xcode 8 and brew. Then I installed openSSL via brew:

brew install openssl
brew link --force openssl

But --force no longer works. Apparently I need to set some flags according to 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

So the question is where do I put these flags in Xcode ?

bfontaine
  • 18,169
  • 13
  • 73
  • 107
user1391606
  • 91
  • 1
  • 2
  • 8
  • [Xcode what's the difference between “Other Linker Flags” vs “Other_LDFLAGS”](https://stackoverflow.com/q/13022084/608639), [Set “OTHER_LDFLAGS” through command line](https://stackoverflow.com/q/20947969/608639), [Where to put makefile flags in a Xcode project?](https://stackoverflow.com/q/13449915/608639), [Using OTHER_LDFLAGS with command line](https://stackoverflow.com/q/25402740/608639), [What is correct way to load zlib via LDFLAGS in a Makefile](https://stackoverflow.com/q/10060938/608639), etc. – jww Jul 14 '17 at 19:30

1 Answers1

2

In fact,by setting

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

to

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

and setting

xcode->targets->build settings-> 

header search path to

/usr/local/opt/openssl/include

the xcode will work for you successfully.

for my setting.

Header search path:

Header search path

Other linker flags:

Other linker flags

wscourge
  • 10,657
  • 14
  • 59
  • 80
Abson
  • 81
  • 4