[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
link errors using OpenLDAP, gcc, Solaris 2.6
I am running solaris 2.6, gcc, and openldap 1.2. The package compiled just
fine, and slapd & so forth work, but I cannot make executables with the API.
"libshell.c" is a tiny test program which #includes ldap.h and lber.h and
then calls ldap_init. The program compiles fine as long as I don't call any
API functions. When I call ldap_init (or any other API call) I get this:
gcc -g -DTEST -I/usr/local/include -g -L/usr/local/lib -lldap -llber -lnsl
-lsocket -o libshell libshell.c
Undefined first referenced
symbol in file
ldap_init /var/tmp/cckX1Xj_1.o
ld: fatal: Symbol referencing errors. No output written to libshell
*** Error code 1
make: Fatal error: Command failed for target `libshell'
I can open the ldap archive with ar, and I can check that the symbol is
defined (in file open.o) with nm. ldap_init IS defined in open.o in library
libldap.a in /usr/local/lib/libldap.a.
Any ideas here?