How to compile .c file with OpenSSL includes?

前端 未结 7 901
醉梦人生
醉梦人生 2020-11-27 03:40

I am trying to compile a small .c file that has the following includes:

#include 
#include 
#include 

        
7条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-27 03:58

    You need to include the library path (-L/usr/local/lib/)

    gcc -o Opentest Opentest.c -L/usr/local/lib/ -lssl -lcrypto

    It works for me.

提交回复
热议问题