首先確保安裝cmake和powershell(需要6以上,本人升級到了7.5),vs(本人用的vs2022)
powershell,默認是5,會編譯不成功,所以附帶一個升級的流程
$PSVersionTable.PSVersion? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 查看當前版本
winget search Microsoft.PowerShell? ? ? ? ? ? ? ? ? ? ? ? 查找可更新的版本
winget install --id Microsoft.Powershell --source winget? ? ? ? ? ? ? ?安裝新版
winget install --id Microsoft.Powershell.Preview --source winget? ? ? ? ? ? ? ?安裝預覽版
以上,先看powershell版本,然后再看可升級的版本,7.5.1和一個7.6.0的預覽版,然后安裝7.5.1(正式版和預覽版二選一就可以,我這里已經安裝過了)
由于powershell多個版本是可以共存的,所以需要把默認的powershell換成當前的7.5.1
powershell 7默認安裝到C:\Program Files\PowerShell了,把?C:\Program Files\PowerShell\7目錄拷貝到?C:\Windows\System32\WindowsPowerShell
將v1.0改成v1.0_old,將目錄7改成v1.0,再將v1.0\pwsh.sh改成powershell.exe
大功告成,shift按住右鍵打開powershell,便可以默認打開7.5.1的新版powershell了
然后下載msquic,參照Building MsQuic
First, clone the repo recursively:?git clone --recurse-submodules https://github.com/microsoft/msquic.git
For existing repositories, run?git submodule update --init --recursive
?to get all the submodules.
然后進入msquic目錄
打開powershell,輸入./scripts/build.ps1
編譯完成后可以在?msquic\build\windows\x64_schannel目錄看到msquic.sln
打開后大概是這樣