This is our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

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's gravatar image

ylda_ljm0620
31101013
accept rate: 0%


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_

permanent link

answered 12 Nov '12, 22:40

ylda_ljm0620's gravatar image

ylda_ljm0620
31101013
accept rate: 0%

edited 12 Nov '12, 22:42

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×1,620
×10
×7

question asked: 10 Nov '12, 00:03

question was seen: 3,863 times

last updated: 12 Nov '12, 22:42

p​o​w​e​r​e​d by O​S​Q​A