[Date Prev][Date Next] [Chronological] [Thread] [Top]

Authentication / C file



Hi , 
i submit my problem.
Im writing a c file to make an LDAP authentication :

#include<stdio.h>
#include<lber.h>
#include<ldap.h>
....
int connexion(void)
{
if ( ( ld = ldap_init( ldap_host, LDAP_PORT) ) == NULL )
{   perror ( "ldap_init" );
    return ( 1 );
}
}
...  

int authentication(void)
{
if ( ldap_simple_bind_s( ld, dn, pw ) != LDAP_SUCCESS )
{ ldap_perror( ld, "ldap_simple_bind_s" );
  return( 1 );
}
} 
...

but when i compile this file a get the following message :

/tmp/cca139941.o: In function `connexion':
/tmp/cca139941.o(.text+0x10): undefined reference to `ldap_init'
/tmp/cca139941.o: In function `authentication':
/tmp/cca139941.o(.text+0x56): undefined reference to `ldap_simple_bind_s'
/tmp/cca139941.o(.text+0x6f): undefined reference to `ldap_perror'

Any clue ?
Thanks
Samson Bisaro

-- 

        \\\|///
      \\  - -  //
       (  @ @ )
----oOOo--(_)-oOOo---------------------

      Samson BISARO         
      http://www.uhp.u-nancy.fr/RRI 

---------------Ooooo-------------------
               (   )
      ooooO     ) /
      (   )    (_/
       \ (
        \_)