Ask Your Question
0

Could NOT find GLIB2 (missing: GLIB2_LIBRARY GLIB2_MAIN_INCLUDE_DIR. Trying to build Wireshark 3.0 on Windows.

asked 2020-05-15 17:24:58 +0000

jlshuman1961 gravatar image

Executed command on Windows: cmake -G "Visual Studio 15 2017 Win64" ..\wireshark

Error returned: Could NOT find GLIB2 (missing: GLIB2_LIBRARY GLIB2_MAIN_INCLUDE_DIR

edit retag flag offensive close merge delete

Comments

That's the correct build command for Wireshark 3.0, but we'll need to see the full output from the command. Please redirect the output to a text file, post the file on a public share and then post a link to it back here. You can redirect using the following:

cmake -G "Visual Studio 15 2017 Win64" ..\wireshark 2>&1 > cmakeout.txt
grahamb gravatar imagegrahamb ( 2020-05-15 20:12:50 +0000 )edit

(I'll put this up here for future reference) Generate the build files
To use a different generator modify the -G parameter. cmake -G lists all the CMake supported generators, but only Visual Studio is supported for Wireshark builds.

C:\Development\wsbuild64>cmake -G
CMake Error: No generator specified for -G

Generators
* Visual Studio 16 2019        = Generates Visual Studio 2019 project files.
                                 Use -A option to specify architecture.
  Visual Studio 15 2017 [arch] = Generates Visual Studio 2017 project files.
                                 Optional [arch] can be "Win64" or "ARM".

<snip>

Chuckc gravatar imageChuckc ( 2020-05-22 02:42:11 +0000 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-05-15 19:44:13 +0000

Chuckc gravatar image

You worked through the cookbook for building on Windows?
The syntax for your command isn't the same as section 2.2.12. Generate the build files

edit flag offensive delete link more

Comments

Yes. Follow all the steps in that cookbook, as described.

Guy Harris gravatar imageGuy Harris ( 2020-05-15 19:56:28 +0000 )edit

That's the correct CMake invocation for Wireshark 3.0 which was built with VS2017.

grahamb gravatar imagegrahamb ( 2020-05-15 20:13:41 +0000 )edit

I don't have an answer but I too have the same error message recently cropping up:

Could NOT find GLIB2 (missing: GLIB2_LIBRARY GLIB2_MAIN_INCLUDE_DIR GLIB2_INCLUDE_INCLUDE_DIR) (Required is at least version "2.32.0")

I have Git 2.14.1 installed. It looks like the most recent release for windows is 2.29.1. So what is "2.32.0"? Is this a git extension?

RickC gravatar imageRickC ( 2020-10-30 15:53:50 +0000 )edit

I think you are confusing git and glib.
Have you set the directory variables as in 2.2.11. Open a Visual Studio Command Prompt

Chuckc gravatar imageChuckc ( 2020-10-30 17:43:47 +0000 )edit

My mistake, a blank character in a DOS set command. My fault for cutting and pasting italic text.

RickC gravatar imageRickC ( 2020-11-11 17:14:05 +0000 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2020-05-15 17:24:58 +0000

Seen: 1,408 times

Last updated: May 15 '20