openssl/ssl.h not found but installed with homebrew

后端 未结 3 470
误落风尘
误落风尘 2021-01-11 13:57

I am working on a C++ project on my Mac running El Capitan and I get this error even after installing openssl with Homebrew:

g++ -Wall -g -std=c++11 -I../lib         


        
3条回答
  •  [愿得一人]
    2021-01-11 14:27

    Try put these in your bash or zsh profile.

    export PATH="/usr/local/opt/openssl@1.1/bin:$PATH"
    export LDFLAGS="-L/usr/local/opt/openssl@1.1/lib"
    export CPPFLAGS="-I/usr/local/opt/openssl@1.1/include"
    export PKG_CONFIG_PATH="/usr/local/opt/openssl@1.1/lib/pkgconfig"
    

提交回复
热议问题