Building wireshark on Windows 10 Fails.
https://www.wireshark.org/docs/wsdg_h...
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 \wireshark.vcxproj]
Can anyone please help me with this?
Thank you.
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.
Hi,
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
What do you have set for the env var QT5_BASE_DIR? And what version of CMake are you using?
Hi,
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
"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 inC:\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.