Operating System - HP-UX
1832220 Members
3207 Online
110041 Solutions
New Discussion

Re: Getting error when change the order of libc.sl, libdce.sl and libdld.sl

 
sunil_23
Occasional Contributor

Getting error when change the order of libc.sl, libdce.sl and libdld.sl

Hi All,
I am building DCE sample application on HP-UX 11.0 platform. I am creating sample application by linking sample.o with libc.sl, libdce.sl and libdld.sl. When order of linking is -lc -ldce -ldld, sample application is working fine. But if I change the order to -ldld -lc -ldce then I am getting error in DCE API sec_login_setup_identity. The error message is "registry server not available". could you please tell me why I am getting error when I change the order of linking?
1 REPLY 1
A. Clay Stephenson
Acclaimed Contributor

Re: Getting error when change the order of libc.sl, libdce.sl and libdld.sl

This is normal linker behavior. Normally, a library is searched only one and thus the order that libraries are listed is (and always has been) extremely important. In a few pathological cases, it can even be necessary to extract the needed objects from several libraries to create a new library just so that the linker can find everything it needs.
If it ain't broke, I can fix that.