[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help to build libssh on windows


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 ?

References:
Help to build libssh on windowsLes Trois Toques <les3toques@xxxxxxxxx>
Re: Help to build libssh on windowsAndreas Schneider <asn@xxxxxxxxxxxx>
Re: Help to build libssh on windowsLes Trois Toques <les3toques@xxxxxxxxx>
Re: Help to build libssh on windowsLes Trois Toques <les3toques@xxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org