views:

10

answers:

1

Hi,

I get the following problem with some openssl (yeah, I know it's poorly documented, but I wish to use it any way) code in a project of mine (written in c, on osx and tested in ubuntu):

Undefined symbols:
"_BIO_new_socket", referenced from: _main in ccG3cvyw.o ld: symbol(s) not found collect2: ld returned 1 exit status

I did have SSL library problems aswel, because I forgot to link my program to the openssl libraries. The above undefined still stands though.

My compile line is:

gcc -o test_app test_app.c -lssl

Versions I use: (GCC) 4.2.1 OpenSSL 0.9.8l 5 Nov 2009

I'm fairly certain it's a (linked) library issue, as the SSL function SSL_set_bio() works (as in does not produce a build error).

Any clue is very much appreciated :)

  • Chuck
A: 

The library I was looking for was crypto. D'oh! Solution: add -lcrypto to gcc line.

Chuck