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

RE: libldap.a error.



Hay. 
	
	this command should work : 

/usr/local/bin/gcc -o ldap main.o libotlldap.a ./lib/libldap.a ./lib/liblber.a -lpthread -lsocket -lnsl

Hagai.

-----Original Message-----
From: owner-openldap-software@OpenLDAP.org
[mailto:owner-openldap-software@OpenLDAP.org]On Behalf Of Vadiraj C S
Sent: Monday, December 22, 2003 11:20 AM
To: OpenLDAP-software@OpenLDAP.org
Subject: libldap.a error.



 Hello everyone!!

   I have installed openldap2.0.23 on solaris machine. I have written a program to talk to ldap server. 

when I compile i get undefined reference for all the socket function that are used by liblber and libldap.a archives..

note:->I have all the network libraries installed in the machine..

Has any one faced this problem. Please guide me in this.

Here is the error I get when I compile 

/usr/local/bin/gcc -o ldap main.o libotlldap.a ./lib/libldap.a ./lib/liblber.a -lpthread

Undefined                       first referenced
 symbol                             in file
socket                              ./lib/libldap.a(os-ip.o)
getpeername                         ./lib/libldap.a(os-ip.o)
gethostbyname_r                     ./lib/libldap.a(util-int.o)
getaddrinfo                         ./lib/libldap.a(os-ip.o)
gai_strerror                        ./lib/libldap.a(os-ip.o)
setsockopt                          ./lib/libldap.a(os-ip.o)
freeaddrinfo                        ./lib/libldap.a(os-ip.o)
inet_ntoa                           ./lib/libldap.a(os-ip.o)
shutdown                            ./lib/libldap.a(os-ip.o)
inet_ntop                           ./lib/libldap.a(os-ip.o)
gethostbyaddr_r                     ./lib/libldap.a(util-int.o)
connect                             ./lib/libldap.a(os-ip.o)


Thanks in advance 

-- 
Regards
Vadiraj C S