Undefined reference to openssl functions when compiling with gcc in Ubuntu 11.10 Undefined reference to openssl functions when compiling with gcc in Ubuntu 11.10 c c

Undefined reference to openssl functions when compiling with gcc in Ubuntu 11.10


Try to put -lssl at the end (after test.c).

$ gcc test.c -lssl -lcrypto


Add below in your make file "in the same order":"LDFLAGS += -lssl -lcrypto"

See more details here:Undefined reference to SSL_library_init and SSL_load_error_strings