3.5. Build Wireshark

The sources contain several documentation files. It’s a good idea to read these files first. After obtaining the sources, tools and libraries, the first place to look at is doc/README.developer. Inside you will find the latest information for Wireshark development for all supported platforms.

[Tip]Build Wireshark before changing anything

It is a very good idea to first test your complete build environment (including running and debugging Wireshark) before making any changes to the source code (unless otherwise noted).

Building Wireshark for the first time depends on your platform.

3.5.1. Building on Unix

Run the autogen.sh script at the top-level wireshark directory to configure your build directory.

$ ./autogen.sh
$ ./configure
$ make

If you need to build with a non-standard configuration, you can run

$ ./configure --help

to see what options you have.

3.5.2. Win32 native

First, check the file config.nmake to determine if it reflects your configuration. The settings in this file are well documented but there are a lot of them so please look closely. If you’ve installed the libraries and tools as recommended there should be no need to change anything.

Many of the file and directory names used in the build process go past the old 8.3 naming limitations. As a result you should use the cmd.exe command interpreter instead of the old command.com.

Be sure that your command-line environment is set up to compile and link with MSVC++. When installing MSVC++, you can have your system’s environment set up to always allow compiling from the command line, or you can invoke the vcvars32.bat script, which can usually be found in the _VC98\Bin_subdirectory of the directory in which Visual Studio was installed.

You should then cleanup any intermediate files, which are shipped for convenience of Unix users, by typing at the command line prompt (cmd.exe):

> nmake -f Makefile.nmake distclean

After doing this, typing at the command line prompt (cmd.exe):

> nmake -f Makefile.nmake all

will start the whole Wireshark build process.

After the build process has successfully finished, you should find a wireshark.exe and some other files in the root directory.