rust编译驱动
- 下载rust安装包,运行,选1自动安装
https://www.rust-lang.org/zh-CN/tools/install - cargo install --force cargo-make
- 安装vs2022,好像至少2019,勾选 sdk26100版本
- 下载安装wdk26100,会自动安装kmdf1.33
- 下载安装clang,64位
https://github.com/llvm/llvm-project/releases/tag/llvmorg-18.1.8
然后去执行rust编译,就ok了
可能的报错:
- Error: cannot find directory: C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\km/crt
wdk版本太低 - Error: cannot find directory: C:\Program Files (x86)\Windows Kits\10\Include\wdf/kmdf/1.33
wdk版本太低 - Unable to find libclang: "couldn't find any valid shared libraries matching: ['clang.dll', 'libclang.dll'],
set theLIBCLANG_PATHenvironment variable to a path where one of these files can be found (invalid: [])"
note: run withRUST_BACKTRACE=1environment variable to display a backtrace
安装clang,配置 LIBCLANG_PATH 环境变量
LIBCLANG_PATH:D:\Program Files (x86)\LLVM\bin - C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\km\crt\crtdefs.h:67:10: fatal error: 'specstrings.h' file not found
sdk版本太低 - BufferOverflowFastFailK.lib(loadcfg.obj) : error LNK2001: 无法解析的外部符号 __guard_eh_cont_table
vs2017 + 不匹配的26100的环境,就会出这个,要升级vs
浙公网安备 33010602011771号