[Libssh] Comment inclure libssh en static ?

.:: Alfred Sawaya ::. huji at huji.fr
Tue Jul 15 11:56:37 CEST 2008


Bonjour a tous,

J'ai un problème avec la libssh.

Dans mes sources j'inclus la libssh comme suit : #include "libssh.h"
J'ai le fichier libssh.h dans le même dossier que mes sources, ainsi que
libssh.a que j'ai obtenu avec un make libssh.a
Je compile comme suit : gcc -o test test.c libssh.a mais j'ai plein
d'erreurs du type :


libssh.a(wrapper.o): In function `sha1':
/home/huji/test/libssh-0.2/libssh/wrapper.c:238: undefined reference to
`SHA1'
libssh.a(wrapper.o): In function `sha1_update':
/home/huji/test/libssh-0.2/libssh/wrapper.c:231: undefined reference to
`SHA1_Update'
libssh.a(init.o): In function `ssh_finalize':
/home/huji/test/libssh-0.2/libssh/init.c:31: undefined reference to
`EVP_cleanup'
/home/huji/test/libssh-0.2/libssh/keyfiles.c:544: undefined reference to
`ERR_get_error'
/home/huji/test/libssh-0.2/libssh/keyfiles.c:544: undefined reference to
`ERR_error_string'
/home/huji/test/libssh-0.2/libssh/keyfiles.c:536: undefined reference to
`PEM_read_RSAPrivateKey'
/home/huji/test/libssh-0.2/libssh/keyfiles.c:508: undefined reference to
`PEM_read_DSAPrivateKey'
/home/huji/test/libssh-0.2/libssh/keyfiles.c:538: undefined reference to
`PEM_read_RSAPrivateKey'
/home/huji/test/libssh-0.2/libssh/keyfiles.c:510: undefined reference to
`PEM_read_DSAPrivateKey'
libssh.a(gzip.o): In function `gzip_decompress':
/home/huji/test/libssh-0.2/libssh/gzip.c:115: undefined reference to
`inflate'
libssh.a(gzip.o): In function `initdecompress':

Si vous pouviez m'avancer sur la solution, ca serait vraiment génial...

Encore merci ! Et bravo !


-- 


 --
|
  .:: Alfred Sawaya ::.
                        |
                      --





More information about the Libssh mailing list