Wireshark-dev: Re: [Wireshark-dev] #include <gcrypt.h> in plugin development

From: Jeff Morriss <jeff.morriss.ws@xxxxxxxxx>
Date: Fri, 02 Jul 2010 12:50:53 -0400
Ivan Lawrow wrote:
I'm developing a plugin that requires use of the encryption library functions in <gcrypt.h> - this file is included in several of the epan dissectors. I can successfully build Wireshark 1.2.8 and 1.3.5 and my plugin without <gcrypt.h> included in the plugin source code. However, when I include <gcrypt.h> in the plugin source code the compiler can't locate it so I guess its a plugin makefile issue.
Has any one encountered this issue before and suggest how to resolve it?

Are you on *NIX or Windows?

On *NIX if your gcrypt.h is not someplace obvious (like /usr/include/) you probably need to add something like:

INCLUDES = -I$(srcdir)/../.. -I$(srcdir)/.. \
        $(LIBGNUTLS_CFLAGS) $(LIBGCRYPT_CFLAGS)

to your plugin's Makefile.am . (The above example is from epan/dissectors/Makefile.am .)

I suppose Windows may have something similar.