Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

C 

Error when compiling for libssh.

Hello hackforums, just reaching out to see if any experienced c coders could help me with this. I'm trying to compile with libssh and i'm receiving these errors.

Code
prg.c:23:11: error: unknown type name ‘SSH_SESSION’
int shell(SSH_SESSION* session)
           ^
prg.c: In function ‘checkauth’:
prg.c:54:5: error: unknown type name ‘SSH_SESSION’
     SSH_SESSION* session;
     ^
prg.c:55:5: error: unknown type name ‘SSH_OPTIONS’
     SSH_OPTIONS* options;
     ^
prg.c:67:59: error: ‘AUTH_SUCCESS’ undeclared (first use in this function)
     if (ssh_userauth_password(session, NULL, password) != AUTH_SUCCESS) {
                                                           ^
prg.c:67:59: note: each undeclared identifier is reported only once for each function it appears in
How are you trying to compile? And can you post libssh?
(Feb 9, 2017 06:53 AM)Annabelle Lee Wrote:  How are you trying to compile? And can you post libssh?

/* cp /usr/local/lib/libssh.so /usr/lib/
gcc -o update prg.c -I /usr/local/include -L /usr/local/lib/ -lssh -lpthread

*/
I just checked out their linking page its pretty straight forward.

http://api.libssh.org/stable/libssh_linking.html
(Feb 9, 2017 07:43 AM)g4143 Wrote:  I just checked out their linking page its pretty straight forward.

http://api.libssh.org/stable/libssh_linking.html

Yeah, too bad that helps almost zero amount.
Has anyone tried searching Stack OverFlow for the answer?

http://stackoverflow.com/questions/32094...my-project
(Feb 9, 2017 08:59 AM)g4143 Wrote:  Has anyone tried searching Stack OverFlow for the answer?

http://stackoverflow.com/questions/32094...my-project

Again this doesn't work. What I figured out is that the program is written for an older version of libssh and you need to change around some of the definitions/function calls to their updated versions. Hence it throws around errors. So far I got most of them gone, except for one, which I'm currently fixing.
(Feb 9, 2017 09:01 AM)Annabelle Lee Wrote:  Again this doesn't work. What I figured out is that the program is written for an older version of libssh and you need to change around some of the definitions/function calls to their updated versions. Hence it throws around errors. So far I got most of them gone, except for one, which I'm currently fixing.
You seem to be working with more information than OP posted.
(Feb 9, 2017 10:50 AM)g4143 Wrote:  You seem to be working with more information than OP posted.

He PMed me on discord asking for help, hence I guess.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Python] by goldenmeanJun 3, 2019 01:42 PM 0 91 Jun 3, 2019 01:42 PM
Last Post: goldenmean
[C] by RxQueenJul 13, 2015 10:15 PM 2 153 Jul 13, 2015 10:15 PM
Last Post: Kantos
[C] by KumaraMay 29, 2015 04:40 PM 16 464 May 29, 2015 04:40 PM
Last Post: 0xDEAD10CC