xcode - 'openssl/conf.h' file not found error on MacOS Sierra -
i working on c++ project uses boost asio. trying build libraries use asia, getting following error
/usr/local/include/boost/asio/ssl/detail/openssl_types.hpp:19:10: fatal error: 'openssl/conf.h' file not found #include <openssl/conf.h>
looking of solutions here & here, tried
brew install openssl brew link openssl --force xcode-select --install
but didn't help.
doing following doesn't seem work
export c_include_path=/usr/local/include export cplus_include_path=/usr/local/include
boost version using boost_1_63_0
. on macos sierra
xcode 8.3.1
. have installed boost using homebrew
brew install boost
as understand other links, xcode looking @ wrong place ssl headers. how can resolve this?
i looked /usr/local/include
& /opt/local/include
. 'openssl/ssl.h' not present in either locations. doing brew install openssl
says following
warning: openssl keg-only , version linked opt. use `brew install --force` if want install version
doing brew install openssl --force
says
warning: openssl-1.0.2k installed, it's not linked.
doing brew link openssl --force
doesn't solve issue.
doig which openssl
returns following:
/usr/local/bin/openssl
please suggest
linked or not, installed homebrew packages reachable via link in /usr/local/opt
. additionally, when install openssl
via homebrew, homebrew tells how use openssl libraries , headers.
~ nega@rust 15s ❯ brew install openssl ==> downloading https://homebrew.bintray.com/bottles/openssl-1.0.2k.el_capitan.bottle.tar.gz downloaded: /users/nega/library/caches/homebrew/openssl-1.0.2k.el_capitan.bottle.tar.gz ==> pouring openssl-1.0.2k.el_capitan.bottle.tar.gz ==> using sandbox ==> caveats ca file has been bootstrapped using certificates systemroots keychain. add additional certificates (e.g. certificates added in system keychain), place .pem files in /usr/local/etc/openssl/certs , run /usr/local/opt/openssl/bin/c_rehash formula keg-only, means not symlinked /usr/local. apple has deprecated use of openssl in favor of own tls , crypto libraries if need have software first in path run: echo 'export path="/usr/local/opt/openssl/bin:$path"' >> ~/.zshrc compilers find software may need set: ldflags: -l/usr/local/opt/openssl/lib cppflags: -i/usr/local/opt/openssl/include pkg-config find software may need set: pkg_config_path: /usr/local/opt/openssl/lib/pkgconfig ==> summary 🍺 /usr/local/cellar/openssl/1.0.2k: 1,696 files, 12mb ~ nega@rust 11s ❯
you don't need brew link
anything. use directories homebrew tells in appropriate places in xcode , cmake.
Comments
Post a Comment