undefined references compiling demo program

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

undefined references compiling demo program

Kevin L. King
I installed OpenSSL 0.9.8 on Fedora in the default /usr/local/ssl directory. I
tried compiling mkcert.c in the ../openssl-0.9.8/demos/x509 directory like
this:

gcc -lcrypto -lssl -L/usr/local/ssl/lib -I/usr/local/ssl/include mkcert.c

I get 4 undefined references for these functions:
RSA_generate_key
X509_set_version
X509_set_pubkey
X509_set_issuer_name

I know RSA_generate_key is deprecated, so I will replace it. But does anybody
know about the other three functions? They are not deprecated, and are defined
in ../openssl-0.9.8/crypto/x509/x509_set.c. I have libcrypto.a,
libcrypto.so.0.9.8, libssl.a, and libssl.so.0.9.8 installed in
/usr/local/ssl/lib. I'm new to openssl, so any help would be greatly
appreciated.

Thanks



--
Kevin King
[hidden email]
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: undefined references compiling demo program

Richard Levitte - VMS Whacker
In message <[hidden email]> on Fri, 19 Aug 2005 16:51:59 -0700, "Kevin L. King" <[hidden email]> said:

kevink> I installed OpenSSL 0.9.8 on Fedora in the default
kevink> /usr/local/ssl directory. I tried compiling mkcert.c in the
kevink> ../openssl-0.9.8/demos/x509 directory like this:
kevink>
kevink> gcc -lcrypto -lssl -L/usr/local/ssl/lib -I/usr/local/ssl/include mkcert.c

Incorrect order of arguments.  You want this:

gcc -L/usr/local/ssl/lib -I/usr/local/ssl/include mkcert.c -lssl -lcrypto

Cheers,
Richard

-----
Please consider sponsoring my work on free software.
See http://www.free.lp.se/sponsoring.html for details.

--
Richard Levitte                         [hidden email]
                                        http://richard.levitte.org/

"When I became a man I put away childish things, including
 the fear of childishness and the desire to be very grown up."
                                                -- C.S. Lewis
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]