Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

oakcreeker

macrumors newbie
Original poster
Sep 28, 2006
3
0
Anyone give me any suggestions on how to fix or where to find help for linking problems with ssl? I've copied a simple ssl example program from here: simple ssl client example I fixed a couple of compile errors, and then dragged the .dylib from /usr/lib/libssl.0.9.7.dylib to the "Link Binary With Library" for the target in XCode. I get a bunch of link errors:

Undefined symbols:
"_X509_free", referenced from:
_main in main.o
"_X509_get_subject_name", referenced from:
_main in main.o
"_X509_NAME_oneline", referenced from:
_main in main.o
_main in main.o
"_X509_get_issuer_name", referenced from:
_main in main.o
"_ERR_print_errors_fp", referenced from:
_main in main.o
ld: symbol(s) not found

...

I don't think I'm linking properly. Btw, I have tried compiling it from the command line ... same errors.

$ g++ -o simple_ssl main.cpp -lsslUndefined symbols:
"_X509_free", referenced from:
_main in ccSTv0wZ.o
"_X509_get_subject_name", referenced from:
_main in ccSTv0wZ.o
"_X509_NAME_oneline", referenced from:
_main in ccSTv0wZ.o
_main in ccSTv0wZ.o
"_X509_get_issuer_name", referenced from:
_main in ccSTv0wZ.o
"_ERR_print_errors_fp", referenced from:
_main in ccSTv0wZ.o
_main in ccSTv0wZ.o
_main in ccSTv0wZ.o
_main in ccSTv0wZ.o
_main in ccSTv0wZ.o
_main in ccSTv0wZ.o
_main in ccSTv0wZ.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

Thanks in advance.

Derrick
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.