一、前言
本教程完全按照Wireshark
官方文档(https://www.wireshark.org/docs/wsdg_html_chunked/ChSetupWin32.html)按部就班地操作。
二、编译环境搭建
1、安装Chocolatey
Chocolatey
是一个Windows的原生包管理器,在https://chocolatey.org/packages上列出了许多软件包。
安装方法参考https://chocolatey.org/install,在Windows 10上以管理员身份运行
打开Windows PowerShell
,执行如下命令:
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
2、安装Microsoft Visual Studio
下载和安装Microsoft Visual Studio 2019 Community Edition
。
在安装过程中,选择桌面应用Desktop development with C++
,保留VC++ 2019
、Windows 10 SDK
、Visual C++ tools for CMake
等组件。