I installed the libssh2 library on my Ubuntu linux. When compiling the C code I received this message:
undefined reference to `libssh2_session_init_ex'
I downloaded the libssh2 from their website. I followed the instructions of how to install it on my computer but It seems i am still missing soemthing.
This is my code in my make file:
all: ssh ssh: mysshpass.c gcc -lssh2 -g -o mysshpass mysshpass.cclean: rm -rf mysshpassThe include part of the C code:
1 #include <stdlib.h>2 #include <libssh2.h>3 #include <libssh2_sftp.h>4 5 #include <sys/socket.h>6 #include <netinet/in.h>7 #include <arpa/inet.h>8 #include <sys/types.h>9 #include <stdio.h>10 #include <string.h>11 12 //#include <libssh2_config.h>13 14 int main(int argc, char *argv[])Thanks very much in advance
Note :
I used this new line :
all: sshssh: mysshpass.c gcc -g -Lusr/src/libssh2-1.4.1/include -o mysshpass mysshpass.cclean: rm -rf mysshpassbut still same compilations errors. By the way, I was told to install the libssh2-devel also, but i have no idea how to do that.
Thanks