WireShark Cmake编译报错FATAL_ERROR "Windows setup (win-setup.ps1) failed

按照官方文档指示,将WireShark git到C:\Development文件夹后,启用vs2019命令行对其编译,报错如下信息:

CMake Error at CMakeLists.txt:146 <message>:
    message(FATAL_ERROR "Windows setup (win-setup.ps1) failed.")

这报错我忙活了一天多,还是百思不得其解,突然恍然大悟:

让我们看看官方的文档内容

Set the following environment variables, using paths and values suitable for your installation:

> rem Let CMake determine the library download directory name under
> rem WIRESHARK_BASE_DIR or set it explicitly by using WIRESHARK_LIB_DIR.
> rem Set *one* of these.
> set WIRESHARK_BASE_DIR=C:\Development
> rem set WIRESHARK_LIB_DIR=c:\wireshark-win64-libs
> rem Set the Qt installation directory
> set QT5_BASE_DIR=C:\Qt\5.15.2\msvc2019_64
> rem Append a custom string to the package version. Optional.
> set WIRESHARK_VERSION_EXTRA=-YourExtraVersionInfow

 

问题出现在了  WIRESHARK_BASE_DIR  的设置上,官方默认git下来后所有的源码内容是在Development文件夹下

但其实git下来后,是在C:\Development\wireshark 下

将对应指令更换成   set WIRESHARK_BASE_DIR=C:\Development\wireshark

再CMake,就成了

WireShark Cmake编译报错FATAL_ERROR "Windows setup (win-setup.ps1) failed

 

WireShark Cmake编译报错FATAL_ERROR "Windows setup (win-setup.ps1) failed

上一篇:阿里云域名查询、域名注册、域名实名认证和域名备案全过程


下一篇:Core 父类 Api 访问HttpContext 为NULL