Subject: Re: libssh2.a static linking problem

Re: libssh2.a static linking problem

From: Guenter <lists_at_gknw.net>
Date: Thu, 19 Jul 2012 14:37:30 +0200

Hi,
Am 19.07.2012 14:01, schrieb £Å£ö£å£ò:
> when I execute
> gcc -Wall -Wl,-as-needed -o ssh_exec ssh2_exec.c
> -I/usr/local/libssh2/include -L/usr/local/libssh2/lib/ -L/lib64
> -Wl,-Bstatic -lssh2 -Wl,-Bdynamic -lpthread
> cmd,I got the following text,but when I use the share lib,that is ok.
> /usr/local/libssh2/lib//libssh2.a(channel.o): In function `channel_x11_req':
> /home/ever/Downloads/libssh2-1.4.2/src/channel.c:1138: undefined
> reference to `RAND_bytes'
you need to add crypto lib dependencies (in your case seems to be
openssl) when you statically link.

G¨¹n.

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2012-07-19