Operating System - HP-UX
1747984 Members
4620 Online
108756 Solutions
New Discussion юеВ

Re: dlsym / dlopen - unresolved symbols

 

dlsym / dlopen - unresolved symbols

$ cc -o mymain mymain.c
/usr/ccs/bin/ld: Unsatisfied symbols:
dlopen (code)
dlsym (code)

Does anyone know what's missing? (HPUX 11.00)
The module compiles to object format.

Secondly I'd just like to say that the development team all hate HP for removing the standard sockets functions in HPUX11.00 and replacing with POSIX ones. Migrating the code from 10.20 is causing a great deal of inconvenience and cost. The XDR functions moved libraries and the book Power Programming with RPC appears to have gone out of print since v11. The v11 STK is not good enough.
2 REPLIES 2
Carlos Fernandez Riera
Honored Contributor

Re: dlsym / dlopen - unresolved symbols


You are using shared librarys and may link w/ some option.

man dlopen may helps you.

unsupported

Re: dlsym / dlopen - unresolved symbols

Thanks, yes it was a stupid error on my part. I left out the relevent command line options for compilation and linking:

For anyone else who wants to use a shared library build the modules with these commands:
cc +DD64 -o myprog -ldl mymain.c
cc +DD64 -c +z mylib.c
ld -b -o mylib.sl mylib.o