0

When installing openssl using brew, a part of the response is outputted:

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

and the following could be used to compile a C++ file.

g++ file.cpp -I/usr/local/opt/openssl/include

What is the -I and the -L for?

j__gt
  • 63
  • 1
  • 5

1 Answers1

7

-L means the path is a dir which contains Libraries for linking (adds the path to the set of dirs the linker will search)

-I means there are header files to Include in the given dir.

Richard Barber
  • 5,257
  • 2
  • 15
  • 26