LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   LDAP Programming on Linux (https://www.linuxquestions.org/questions/linux-software-2/ldap-programming-on-linux-20282/)

Jamesminh 05-06-2002 01:55 AM

LDAP Programming on Linux
 
Dear sir,

I am attempt wrote a simple LDAP example. That content 9 line below:

#include <stdio.h>
#include <ldap.h>

int main()
{
LDAP *ld;
ld=ldap_open("localhost",LDAP_PORT);
exit(0);
}

and compile it using:
gcc test.c -o test /with test.c is this source file/

But they have a error:
/tmp/cc6Bk4vA.o: In function 'main':
/tmp/cc6Bk4vA.o(.text+0x14): undefined reference to 'ldap_open'
collect2: ld returned 1 exit status.

This message will arrival agian with any ldap function. I had test it on SuSE 7.1 and RedHat 7.1 but the result is the same like above. Please help me if you now why this happen.

Thank you very much

Cam Minh

acid_kewpie 05-06-2002 04:36 AM

http://www.linuxquestions.org/questi...threadid=20280
please don't double post


All times are GMT -5. The time now is 03:22 AM.