Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: [Wireshark-dev] Linking library static when developing plugin dissector

From: Marcus Wallstersson <wallstersson@xxxxxxxxx>
Date: Mon, 7 May 2012 10:12:03 +0200
Hello!

I'm developing a plugin dissector on Ubuntu following the
README.developer and README.plugin I used the gryphon plugin as
"template" as the guide recommended.

The plugin includes a parser ie. "#include <myparser.h>".
The library files for this parser is /usr/lib64/libmyparser.so and
/usr/lib64/libmyparser.a

 It works great on my computer with the library files. But my problem
is that I need to link this library static into the .libs/myplugin.so
so that a person that don't have the library files can run the plugin.
I ran the command "nm .libs/myplugin.so" and it shows that the parser
functions are Undefined "U"

I did two static link tests on a small c application using my parser,
and it worked great on another computer.
"gcc test.c /usr/lib64/libmyparser.a"
"gcc test.c -Wl,-Bstatic -lmyparser -Wl,-Bdynamic"

How should i do this linking when building my plugin?

Regards
Marcus Wallstersson