ld: library not found for -lcrypto.1.0.0 on OSX 10.11.6

1.3k views Asked by At

Am facing this problem while building on OSX 10.11.6 Our solution used to build well 10.10 and earlier but with OSX 10.11 facing this issue. I have installed latest openssl. In project.pbxproj I have given absolute path of lib - /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib

Have added this in DYLD_LIBRARY_PATH and PATH variables. Have added this in LDFLAGS too. Have included /usr/local/Cellar/openssl/1.0.2h/lib path too. Still facing this linking error.

I don't have prior experience in mac, just trying to make this build work. Any help is appreciated, Thanks :)

2

There are 2 answers

0
Neha On

Adding LIBRARY_SEARCH_PATHS in build file worked.

0
RUBEN IÑIGO TEJEDOR On

I solved it adding LIBRARY_PATH variable with the path to the library.

export LIBRARY_PATH=$(brew --prefix openssl@3)/lib:/usr/local/lib:/usr/lib:$LIBRARY_PATH

In my case, I included it on .gitlab-ci.yml, but I guess adding it elsewhere will work.