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

Re: undefined reference to `ssh_new`


Hi,

I recommend you a good reading of this: http://jrv.oddones.org/lib.html
or any other documentation about shared libraries.
In order to avoid having to type -lssh each time, consider writing a
makefile. lmgtfy: http://mrbook.org/tutorials/make/

kr,

Aris

Shawn Braune a écrit :
> eeeek, wow such an easy fix. Thanks a lot, now why do I have to do
> that?? What is the reason behind it?? Sorry about the question, but I
> like to be able to understand whats going on and know why every time I
> use the libssh i have to use -lssh? Is there away to set up gcc to do it
> for me??
> 
> --- On *Thu, 6/24/10, Aris Adamantiadis /<aris@xxxxxxxxxxxx>/* wrote:
> 
> 
>     From: Aris Adamantiadis <aris@xxxxxxxxxxxx>
>     Subject: Re: undefined reference to `ssh_new`
>     To: libssh@xxxxxxxxxx
>     Date: Thursday, June 24, 2010, 7:09 AM
> 
>     Hi,
> 
>     You probably forgot to link with libssh. If you're compiling by hand,
>     just add -lssh to the command line, or if you're using an IDE, configure
>     it to link with the "ssh" library.
> 
>     Aris
> 
>     Shawn Braune a écrit :
>     > Yes, I am new to this library and i guess on the intermediate level of
>     > programing, but when I was just trying to try out libssh by just
>     > declaring a session and using the ssh_new() I get this when I
>     compile it
>     >
>     > /tmp/ccK5xvPt.o: In function `main':
>     > test.c:(.text+0xa): undefined reference to `ssh_new'
>     > collect2: ld returned 1 exit status
>     >
>     > I honestly I am stumped on this, and it is most likely a easy fix
>     but I
>     > am stumped. Could anyone possible point me in the right direction??
>     >
>     >
> 
> 
> 

References:
Re: undefined reference to `ssh_new`Shawn Braune <n30h4x@xxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org