On Thursday 18 September 2014 22:39:20 wenew zhang wrote:
> > Hello,all,
Hi,
> > i try to install and compile the libssh example on Mac OS X,but i got a
> > linker error! clang -std=c99 senddata.c -I../include
> >
> > Undefined symbols for architecture x86_64:
> > "_connect_ssh", referenced from:
> > _main in senddata-d1d25f.o
> >
> > "_ssh_channel_close", referenced from:
> > _main in senddata-d1d25f.o
> >
> > "_ssh_channel_new", referenced from:
> > _main in senddata-d1d25f.o
> >
> > "_ssh_channel_open_session", referenced from:
> > _main in senddata-d1d25f.o
> >
> > "_ssh_channel_request_exec", referenced from:
> > _main in senddata-d1d25f.o
> >
> > "_ssh_channel_send_eof", referenced from:
> > _main in senddata-d1d25f.o
> >
> > "_ssh_channel_write", referenced from:
> > _main in senddata-d1d25f.o
> >
> > "_ssh_disconnect", referenced from:
> > _main in senddata-d1d25f.o
> >
> > "_ssh_get_error", referenced from:
> > _main in senddata-d1d25f.o
> >
> > ld: symbol(s) not found for architecture x86_64
> > clang: error: linker command failed with exit code 1 (use -v to see
> > invocation)
> >
> > my laptop is mac pro with OS X 10.9.4,
> > i have already used port install libssh 0.6.3,
> > compile by
> > clang senddata.c -I/opt/local/include
> > the problem still exists!
> >
> > how to fix it ?
I would link against libssh ...
clang senddata.c -I/opt/local/include -lssh
-- andreas
--
Andreas Schneider GPG-ID: CC014E3D
www.cryptomilk.org [email protected]