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

Re: openldap shared libs

On Wednesday, August 11, 2004, at 06:16 AM, Bill Edison wrote:
I'm new to lots of things here and hope I'm not going off topic. We're authenticating to a local
ldap server as part of a credit card billing routine, which is written using microfocus cobol and
Oracle 9.2 (just an fyi). . I installed openldap-2.2.13 on our AIX 5.2 box to write a client api,
which authenticates fine as a stand-alone. However, when I changed the standalone into a
function call, I got an error :

ld: 0711-317 ERROR: Undefined symbol: .main
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
collect2: ld returned 8 exit status
My compile routine is:

00001 export OL=/opt/ol
00002 export OLLIB=$OL/lib
00003 export OLINC=$OL/include
00004 export OLCLI=$OL/clients
00005 export PATH=$OL/include:$OL/libraries:$PATH
00006 export LIBPATH=$OLLIB:$OLLIB/libldap:$OLLIB/liblber:$OLLIB/libldap_r:/usr/lib
00007 export LIBPATH=$LIBPATH:$OLLIB/liblunicode:$OLLIB/libutil:$OLLIB/liblrewri
00009 gcc -lldap -L$OLLIB -I$OLINC -I$OL -llber -o ldapauth.so ldapauth.c

Apologies for the redundant env entries . Which library am I missing??

I don't have any idea, not even whether that's the right question (wouldn't think so, given the error message.) But since I may be the only regular around here who has been building OpenLDAP on AIX 5.2, let me just comment that it works for me, with a fairly complex assortment of dependent libraries (Kerberos, SASL etc.), when I do it the old fashioned way:

 1. use IBM's xlc C compiler.
 2. link everything statically.

I am optimistic that this approach would work out better for you, too.

	Donn Cave, donn@u.washington.edu