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

error while compiling code give on http://api.libssh.org/master/libssh_tutor_guided_tour.html


Hello,
I tried the example give on the link http://api.libssh.org/master/libssh_tutor_guided_tour.html
I am facing problem compiling code when I add the function show_remote_processes mentioned on the said page. I am getting the following error:
# gcc test.c  -l sshtest.c: In function ‘show_remote_processes’:test.c:13:11: warning: assignment makes pointer from integer without a cast/tmp/ccYlVHrp.o: In function `show_remote_processes':test.c:(.text+0x31): undefined reference to `ssh_channel_new'test.c:(.text+0x62): undefined reference to `ssh_channel_open_session'test.c:(.text+0x85): undefined reference to `ssh_channel_free'test.c:(.text+0xa9): undefined reference to `ssh_channel_request_exec'test.c:(.text+0xcc): undefined reference to `ssh_channel_close'test.c:(.text+0xe0): undefined reference to `ssh_channel_free'test.c:(.text+0x110): undefined reference to `ssh_channel_read'test.c:(.text+0x151): undefined reference to `ssh_channel_close'test.c:(.text+0x165): undefined reference to `ssh_channel_free'test.c:(.text+0x191): undefined reference to `ssh_channel_read'test.c:(.text+0x1b8): undefined reference to `ssh_channel_send_eof'test.c:(.text+0x1cc): undefined reference to
 `ssh_channel_close'test.c:(.text+0x1e0): undefined reference to `ssh_channel_free'collect2: ld returned 1 exit status

Below is the result of whereis command:#whereis libssh.hlibssh: /usr/lib/libssh2.a /usr/lib/libssh.so /usr/lib/libssh2.so /usr/lib64/libssh2.a /usr/lib64/libssh.so /usr/lib64/libssh2.so /usr/include/libssh /usr/include/libssh2.h
Following is the information about my OS:# uname -aLinux ubuntu 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

I tried google but failed to find the reason for this.
Regards,

Sunil Datta


Archive administrator: postmaster@lists.cynapses.org