On 10/26/2013 04:36 AM, Juan Bússoli wrote:
Hello,

I am trying to create a dynamic module for SNMP, which needs use some functions that are in a dynamic library. To compile the module, I have modified the Makefile that you provide me in the tutorial "Writing a Dynamically Loadable Object", as result I got some thing like this:

CC=gcc

all: ./$(MODULE_NAME).c Makefile
$(CC) $(INCLUDES) $(INC_MODULES) $(CFLAGS) $(DLFLAGS) -L $(API_ROOT_DIR) -Bdynamic -l $(API_ROOT_DIR)/libdinamic.so -c -o ./$(MODULE_NAME).o ./$(MODULE_NAME).c
$(CC) $(CFLAGS) $(DLFLAGS) -o ./$(MODULE_NAME).so ./$(MODULE_NAME).o

The file "libdinamic.so" is the dynamic library that I intend to link to my dynamic module. When i do "make", the build is successful. However, when i try to load the dynamic module it throws the following error:

undefined symbol: my_drvr_load       error

"my_drvr_load" is a function inside the dinamic library. How could I do this correctly? From already, thank you very much.


nm checks whether my_drvr_load is in libdinamic.so or not.

Regards,
Juan




------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk


_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to