> From: owner-openssl-us...@openssl.org On Behalf Of chetan > Sent: Monday, April 14, 2014 00:42
> xxx.c is my program file. > So, i'm compile simply like "cc xxx.c ". > I am Gettting [undefined reference] This is basic C programming. Whenever you link (not just compile) a C program that uses a library (or several) other than the standard C lib(s) you must specify it(them) to the linker, or to the compiler when it runs the linker as here. The exact syntax depends on what compiler and/or linker you are using, which you don't say, but AFAIK the component 'collect2' indicates GCC/binutils. The syntax for that (and some others) is -lxxx where l is lowercase ell and xxx is the 'short' name of the library; the actual filename is usually libxxx.so or libxxx.a . For OpenSSL EVP* routines (and more generally everything but actual SSL/TLS) the library you need is -lcrypto . If the library(s) you want isn't placed in the compiler's (or platform's) default location for libs, you also need to specify -L (uppercase ell) with the directory. If you are using a OS-vendor-provided or packaged version, as on Linux, it will almost certainly be in the default location, whatever that is for a given distro. ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org