中国开发网: 论坛: 程序员情感CBD: 贴子 425731
haitao
发现也许是库用错了??
gcc -g -D_DEBUG -o withsslclt withssl.o -lssl -lcrypto -ldl
这样编译出来的60k的程序可以正确运行的,但是使用的是最新的库吗?


gcc -g -D_DEBUG -o withsslclt withssl.o /home/src/ssl/openssl-0.9.8c/libssl.a /home/src/ssl/openssl-0.9.8c/libcrypto.a -ldl
这样编译出来的1.1M的程序无法运行的:
Error attempting to connect
24688:error:140A90A1:SSL routines:SSL_CTX_new:library has no ciphers:ssl_lib.c:1424:
24688:error:140BA0C3:SSL routines:SSL_new:null ssl ctx:ssl_lib.c:244:


gcc -static -g -D_DEBUG -o withsslclt withssl.o /home/src/ssl/openssl-0.9.8c/libssl.a /home/src/ssl/openssl-0.9.8c/libcrypto.a -ldl
这样编译出来的1.5M的程序运行会报段错误,好像初始化SSL结构失败

相关信息:


欢迎光临本社区,您还没有登录,不能发贴子。请在 这里登录