i try to compile this:
#include <libssh/libssh.h>
#include <stdlib.h>
#include <stdio.h>
int main(void)
{
ssh_session my_ssh_session = ssh_new();
if (my_ssh_session == NULL)
exit(-1);
else
{
printf("Initialisation terminé");
ssh_free(my_ssh_session);
}
return 0;
}
when i compile this program: gcc -Ilibsh/include -o sample libssh/sample.c
-L -lssh
i got this message:
/tmp/cc6DVa3x.o: in function 'main.c':
sample.c:(.text+0x12): undefined reference to `ssh_new`
sample.c:(.text+0x3e): undefined reference to 'ssh_free'
collect2: ld returned 1 exit status
what's the problem here ?