Instructions for Cygwin's GCC


This page is obsolete.

The following experimental information is about compiling Wireshark using cygwin's GCC compiler on Windows.

Please remember that MSVC6 is the recommended compiler to build Wireshark on Win32 platforms, see the Developer's Guide for details.

Using GCC might be quite difficult and the built binaries will only run in a cygwin environment using an X server, so they are not standalone Win32 applications.

It is however not excluded that native Win32 code can be compiled on cygwin GCC but you then have to use -mms-bitfields as a strict minimum and probably -mno-cygwin or a similar compiler flag too.

It is possible to build Wireshark under Cygwin using their version of XFree86. References:

To get it running, execute the following steps:

1. Install the required cygwin packages (compiler, scripting, X, zlib)

2. Download glib-1.2.10 and gtk+-1.2.10 from a mirror of www.gnome.org.

3. Retrieve the patches for glib-1.2.10 and gtk+-1.2.10 from

4. Compile and install both packages after patching (see instructions

5. Patch Makefile.am in <wireshark-src>/gtk/Makefile.am by

6. Configure and make Wireshark:

7. Start X

8. Run wireshark (add /opt/gnome/bin to $PATH if this is not yet done)

Note: Compiling Wireshark under cygwin takes a lot of time, because the generation of 'register.c' takes ages. If you only edit one dissector and you know what you're doing, it is acceptable to uncomment the generation of the file 'register.c' in Makefile. Look for the 'register.c' target:

Of course, you need to generate the 'register.c' file at least once.

Note: You can also capture packets on a cygwin built Wireshark. You then have to unpack the WinPCap development package, install the files in lib/ and include/ in say /usr/lib and /usr/include (they must be in the search path of the compiler and linker, otherwise you have to specify the configure option --with-pcap=/location/to/pcap so the packet capture functionality can be used. In order to run Wireshark, you have to add the .dll files in a directory in the PATH (e.g., /bin). Should you want packet capturing enabled in the cygwin build, then you have to remove --without-pcap from step 6.

Development/CygwinGCC (last edited 2012-01-06 15:51:33 by BillMeier)