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

Link own libpcap.a

0

Hey, I downloaded the wireshark source code and I was wondering if it's possible to link my own libpcap.a?

asked 08 Mar '12, 12:08

Freaky's gravatar image

Freaky
1111
accept rate: 0%


One Answer:

1

You'd have to install your own libpcap.a (or libpcap shared library) and:

  • if you're building Wireshark with autotools, so that you're running the ./configure script before you run make, you need to run the configure script with the --with-pcap=directory command-line option, where directory is the install directory for your libpcap ("install directory" doesn't mean "the directory containing the library", it's the directory above that, e.g. if it's in /usr/local/lib, directory would be /usr/local; you would also have to install libpcap's header files as well);
  • if you're building Wireshark with CMake, so that you're running cmake before you run make, you need to run cmake with the -DCMAKE_PREFIX_PATH=directory command-line option, where directory is the install directory for your libpcap.

answered 08 Mar '12, 14:36

Guy%20Harris's gravatar image

Guy Harris ♦♦
17.4k335196
accept rate: 19%

edited 21 May '16, 16:08

Thank you, but how do I configure Wireshark with the parameter? Is there a configuration file or do I add the parameter when I build/compile it?

(08 Mar '12, 23:46) Freaky

That's a parameter for the configure step in the build.

(09 Mar '12, 08:27) Jaap ♦
1

And, in fact, I already said, in my answer, how to set that parameter:

...and configure Wireshark with --with-pcap=directory, where directory is the install directory for your libpcap ("install directory" doesn't mean "the directory containing the library", it's the directory above that, e.g. if it's in /usr/local/lib, directory would be /usr/local; you would also have to install libpcap's header files as well).

"configure wireshark with..." means "run Wireshark's configure script with ... as an argument".

(09 Mar '12, 10:32) Guy Harris ♦♦