This is our old Q&A Site. Please post any new questions and answers at

I've written a test plugin for Wireshark. I did the following:

  1. I followed the instructions in README.plugins
  2. I then created an Empty C++ project called foo in the Plugins folder in Solution Explorer
  3. I used Add -> Existing item to add the various files into the foo plugin folder, basically mimicking what was in the gryphon folder

This all looked fine but Visual Studio hadn't picked up the External References, and I wasn't keen to hunt down the various include files and add them manually. What to do?

This is a rhetorical question as I've figured out the fix but it's worth documenting here.

asked 08 Nov '15, 14:46

PaulOfford's gravatar image

accept rate: 11%

The answer is:

  1. Open CMakeList.txt in the Wireshark base directory
  2. Edit the list of files after set(PLUGIN_SRC_DIRS to add your new plugin
  3. Save
  4. Change to the build directory
  5. Run the cmake command to create the build files
  6. Start VS using the Wiresahrk.sln in the build directory

For me, the cmake command to create the build files was:

cmake -D ENABLE_CHM_GUIDES=on -G "Visual Studio 12 Win64" ..\

The above is described in the README.plugins file but it's in the section 3.2 Permanent addition and I skipped over it because I wasn't writing a permanent addition.

Best regards...Paul

permanent link

answered 08 Nov '15, 14:58

PaulOfford's gravatar image

accept rate: 11%

The correct solution is to copy CMakeListsCustom.txt.example in the root of the source tree to CMakeListsCustom.txt and edit as required.

The reason for this is that modifying the main CMakeLists.txt will change a git controlled file, so you'll always have to manage a merge when you update from the Wireshark repository. Using the custom file avoids this.

There is provision for similar CMakeListsCustom.txt files in the epan and ui\gtk directories.

(09 Nov '15, 02:51) grahamb ♦

Thanks Graham. That sounds a much better solution.

(09 Nov '15, 03:08) PaulOfford
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 08 Nov '15, 14:46

question was seen: 662 times

last updated: 09 Nov '15, 03:08

p​o​w​e​r​e​d by O​S​Q​A