From: "David Schwartz" <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: <[EMAIL PROTECTED]> Subject: RE: compiling a c program whit openssl problem Date: Mon, 1 Mar 2004 17:54:28 -0800
> i hope this mesage wont make it throw twice... i send the first > one before > suscribing... > > ok... > when i try to compile a c program whit some openssl function in it .... > a program thats look like this... > > > #include <stdio.h> //required by every program > #include <openssl/rsa.h> //rsa library > > main() > { > > srand(5); > RSA *rsa; > rsa = RSA_generate_key(1024, 65537, NULL, NULL); > } > > when i do cc -o rsa_test rsa_test.c (to compile it) i always get > > /tmp/ccchRiVH.o(.text+0x3b): In function `main': > : undefined reference to `RSA_generate_key' > collect2: ld returned 1 exit status > > what i am doing wrong????
Did you install OpenSSL or did it come with your system/distribution?
> i also tryed to compile the the RSA_generate_key sample program > located in > the tarball of openssl > (openssl/demos/eay/loadrsa.c) > > and i get the same mistake for every openssl function.... > > someone tol me i probably need to set a library on my compile comand > line.... but i cant find any help on this.... > ????
That's system-specific. Perhaps '-lssl -lcrypto' will do it, perhaps not. How did your OpenSSL headers get in your include path?
DS
______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]
i did not install openssl it was installed a system instalation (red hat 9.0)
_________________________________________________________________
MSN Search, le moteur de recherche qui pense comme vous ! http://fr.ca.search.msn.com/
______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]