I previously used open-ssl to build my Apache/mod-ssl httpd, but
now I can't seem to get started using it to build a simple SSL-enabled
http client.  I'm getting `undefined reference' errors when linking.

OS: FreeBSD-3.1
Compilers: gcc-2.7.2.1 and egcs-1.1.2 (tried both)
openssl version: OpenSSL 0.9.3a 29 May 1999 

Simplified example program (ssltest.c):

  #include <openssl/ssl.h>
  
  void main()
  {
    SSL_CTX *ssl_ctx;
  
    SSL_library_init();
    ssl_ctx = SSL_CTX_new(SSLv23_method());
  }

Compiled with:

  $ cc -Wall -I/usr/local/include -L/usr/local/lib -lcrypto -lssl -o ssltest ssltest.c
  /var/tmp/ccS544421.o: In function `main':
  /var/tmp/ccS544421.o(.text+0x7): undefined reference to `SSL_library_init'
  /var/tmp/ccS544421.o(.text+0xc): undefined reference to `SSLv23_method'
  /var/tmp/ccS544421.o(.text+0x14): undefined reference to `SSL_CTX_new'
  *** Error code 1
  
  Stop.

But the symbols appear to be in the libssl.a library that I'm
linking with:

  nm /usr/local/lib/libssl.a | egrep '(SSL_library_init|SSLv23_method|SSL_CTX_new)'
  00000000 T SSLv23_method
  0000095c T SSL_CTX_new
  00000000 T SSL_library_init


What am I missing?

-- 
$Id: .signature,v 1.3 1998/03/02 22:18:29 j Exp $


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to