I make myown dynamic library(myown.so) according to libs of wiresahrk and glib. (libglib-2.0.a libglib-2.0.a libgthread-2.0.a libairpdcap.a libdfilter.a libdissectors.a libftypes.a libwireshark.a libwiretap.a libwsutil.a libwireshark_asmopt.a libwireshark_generated.a libdirtydissectors.a ) include path(glib-2.0,wireshark,wireshark/epan). myown.so can be made successfully, but loaded fail. ldd -r myown.so, errors are as follow: undefined symbol: proto_item_fill_label (./myown.so) undefined symbol: g_sprintf (./myown.so) undefined symbol: g_assertion_message_expr (./myown.so) undefined symbol: register_all_protocol_handoffs (./myown.so) undefined symbol: register_all_protocols (./myown.so) undefined symbol: epan_init (./myown.so) undefined symbol: epan_dissect_init (./myown.so) undefined symbol: frame_data_set_before_dissect (./myown.so) undefined symbol: epan_dissect_run (./myown.so) undefined symbol: epan_dissect_cleanup (./myown.so) undefined symbol: g_malloc0 (./myown.so) what is the reason? someone help me, please. Thank you very much. asked 10 Nov '12, 00:03 ylda_ljm0620 |
One Answer:
I have built myown.so and loaded successfully. I use the glib-2.0 which is installed. In makefile, there are: VPATH = -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include GLIB_DIR =/usr/lib WIRESHARKLIB_DIR =../wireshark/lib ZIPLIB_DIR = ../zip LIBS = /usr/lib LIBS = -L$(GLIB_DIR) -lgthread-2.0 -lgmodule-2.0 -lglib-2.0 -L$(WIRESHARKLIB_DIR) -lairpdcap -ldfilter -ldissectors -lftypes -lwireshark -lwiretap -lwsutil -lwireshark_asmopt -lwireshark_generated -ldirtydissectors \ -L$(ZIPLIB_DIR) -lz \ -lpthread -ldl -lrt -rdynamic CFLAGS = -g -w -DOS_LINUX -DHAVE_CONFIG_H -D_U_ answered 12 Nov '12, 22:40 ylda_ljm0620 edited 12 Nov '12, 22:42 |