Cannot find libcrypto library error

前端 未结 2 803
误落风尘
误落风尘 2020-12-09 15:58

When i am trying to compile a C code which uses openssl \'crypto\' library functions with comand line -lcrypto with gcc 4.4.3 it gives

2条回答
  •  悲&欢浪女
    2020-12-09 16:37

    This might be relevant for people who tried to build their own openssl from source and then use it to compile other programs (in my case Git)

    During configuration of openssl, add 'shared' option:

    ./config shared

    This will create the required shared library libcrypto.so. You'll find more in the INSTALL file.

    Also, if you run into this error during 'make'

    "....can not be used when making a shared object

    recompile with -fPIC

    ./config shared -fPIC

提交回复
热议问题