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

LDAP Programming (ITS#1802)

Full_Name: Cam Minh Luong
Version: 2
OS: SuSE 7.1 and RedHat 7.1
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (

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;

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