views:

116

answers:

1

-I am trying to compile a netsnmp mib and extend the functionality of the snmp agent.

  • When I try to start the daemon and load the shared object (*.so) , the daemon complains about undefined symbols. "dlopen failed: Filename.so: undefined symbol: netsnmp_container_table_row_extract"

  • On further prodding #nm -D -u Filename.so prints out a number of undefined references/ symbols

  • Some of these references are system calls specific to the snmp agent.

  • I do not have any problem in compiling the code. All of the missing references/symbols are calls to the netsnmp agent.

Question : 1. How am I able to compile without resolving these symbols ? AFIK : These symbols must have been resolved statically. 2. I assume the system is not able to resolve these at run time ? 3. How could i get over this problem ? Any suggestions

Thanks S.S

A: 

If the symbols are from another library, you should link against it at the compile time. If the symbols are from the main application, the application should be linked with --export-dynamic.

wRAR