Without knowing the exact errors you are seeing, it is difficult to provide an exact solution. Here is my best attempt.
From the information you provided, it sounds as though the linker is failing because it cannot find a reference to the md5
function in libssl.a
. I believe this function is actually in libcrypto
so you may need to specify this library as well.
g++ server.cpp -L/usr/lib -lssl -lcrypto -o server