Building wireshark on Windows 10 Fails.

asked 2021-05-27 11:28:30 +0000

updated 2021-05-27 13:07:13 +0000

cmaynard gravatar image

Generating Build files fails when I run the following command from the above link

msbuild /m /p:Configuration=RelWithDebInfo Wireshark.sln.

It gives me 3687 number of linker errors some of them are

libqtmain.a(qtmain_win.o) : error LNK2001: unresolved external symbol _Znay [C:\Users\sysadmin\Development\wireshark\wireshark.vcxproj]
         libqtmain.a(qtmain_win.o) : error LNK2001: unresolved external symbol _Z5qMainiPPc [C:\Users\sysadmin\Development\wireshark\wireshark.vcxproj]
         libqtmain.a(qtmain_win.o) : error LNK2001: unresolved external symbol _ZdaPv [C:\Users\sysadmin\Development\wireshark\wireshark.vcxproj]
         C:\Users\sysadmin\Development\wireshark\run\RelWithDebInfo\Wireshark.exe : fatal error LNK1120: 3686 unresolved externals [C:\Users\sysadmin\Development\wireshark

Can anyone please help me with this?

Thank you.

edit retag flag offensive close merge delete


Looks similar to Error compiling Wireshark with Visual Studio 2019.
Work through the steps mentioned there and verify the dev environment was setup according to the dev guide.

Chuckc gravatar imageChuckc ( 2021-05-27 13:29:09 +0000 )edit


I have actually followed all steps, relooked into the steps and checked all steps everything looks ok. But unable to rectify why the build fails.

Thank you

Vijayeendra gravatar imageVijayeendra ( 2021-05-27 16:26:38 +0000 )edit

What do you have set for the env var QT5_BASE_DIR? And what version of CMake are you using?

grahamb gravatar imagegrahamb ( 2021-05-27 18:48:37 +0000 )edit


The build was successful. I created a separate build folder wsbuild_64 and re-directed the build files into that directory by giving command

cmake -G "Visual Studio 16 2019" -A x64 ..\wireshark -B C:\Users\sysadmin\Development\wsbuild64

Later I built the code in that folder and it was successful.

Thank you

Vijayeendra gravatar imageVijayeendra ( 2021-05-28 04:24:22 +0000 )edit

"A separate build folder", separate from what?

That kind of change has never been needed before, but if it works for you. Note that the WSDG does say to use a separate build folder, i.e. source in C:\Development\Wireshark and build in C:\Development\wsbuild64. The WSDG also notes that 32 and 64 bit builds require a separate build directory.

Build directories are expendable, they can be deleted at any time and the CMake generation step run again.

This is needed if any 3rd party components are changed, e.g, the version of Qt, as CMake caches anything found and won't update (or even search) again. A somewhat simpler option is to delete the CMakeCache.txt file in the build dir.

grahamb gravatar imagegrahamb ( 2021-05-28 07:56:08 +0000 )edit