4

I'm using a compiler to try to make a set of files I've been given and the line #include breaks with the error: Fatal Error: 'openssl/conf.h' file not found.

I've already installed openssl using brew, but it doesn't seem to work. Do I need to somehow connect openssl with my folder that I'm working in?

I'm on the newest mac OS sierra.

Dorilds
  • 418
  • 1
  • 7
  • 15
  • 1
    What compiler are you using? What's its search path for include files? Does it include the Homebrew OpenSSL directory? – Ssswift Jun 06 '17 at 16:30
  • How would I change the path to include Howbrew and OpenSSL? – Dorilds Jun 06 '17 at 16:38
  • 1
    I don't know. You haven't told us what compiler or build system you're using. – Ssswift Jun 06 '17 at 17:17
  • I'm using a CC compiler in a makefile – Dorilds Jun 06 '17 at 17:29
  • "CC" *means* "C compiler". Do you mean `/usr/bin/cc`, i.e., Clang? – Ssswift Jun 06 '17 at 17:50
  • Yeah that's the one – Dorilds Jun 06 '17 at 17:58
  • State where the OpenSSL you want to use is located. Show how you configured your project if its Autoconf based. Show your compiler and linker commands. Also see [Homebrew refusing to link OpenSSL](http://stackoverflow.com/q/38670295), [Update OpenSSL on OS X with Homebrew](http://stackoverflow.com/q/15185661), [How to install latest version of openssl Mac OS X El Capitan](http://stackoverflow.com/q/35129977), [How to upgrade OpenSSL in OS X?](http://apple.stackexchange.com/q/126830), [Openssl installation using HomeBrew fails](http://superuser.com/q/486389), etc. – jww Jun 06 '17 at 22:01

1 Answers1

5

Running:

brew info openssl

gives the solution :

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
Ortomala Lokni
  • 56,620
  • 24
  • 188
  • 240
  • How does this work in xcode? I have added `-L/usr/local/opt/openssl/lib` to `Other Linker Flags` and `-I/usr/local/opt/openssl/include` to `Other C Flags` but xcode won't find openssl/conf.h –  Feb 06 '19 at 13:20
  • @78573 It's better to ask a new question with all details. – Ortomala Lokni Feb 06 '19 at 14:30
  • I have made a mistake, my lib was outdated and did not match dependencies, that's why it did not work in my scenario. An update helped. –  Feb 07 '19 at 11:36