Link to libssland libcrypto. Yours LDFLAGSand LDLIBSwill look as follows. Questions for ordering LDLIBS:
LDFLAGS = -L/usr/local/ssl/lib
LDLIBS = -lssl -lcrypto
Don't worry about adding "lib" in front of the library name or the suffix "so" or "a". The compiler will do this for you.
, . , .
gcc foo.c -o foo.exe -L/usr/local/ssl/lib -lssl -lcrypto
OpenSSL, -L/usr/local/ssl/lib.