I am new to Openssl. I have openssl 1.1.0e and libssl-dev installed on ubuntu 16.04. I am trying to run the example on this page in openssl documentation https://www.openssl.org/docs/man1.1.0/crypto/EVP_DigestInit.html.
I use the command
gcc example1.c -lssl -lcrypto
to compile the program. But I get the following error Undefined Reference error
I have seen related questions on the forum but cannot find the solution. If anyone can help with pointing out the solution, it will be a great help.