1、安装Visual Studio 2019 https://visualstudio.microsoft.com/downloads/
2、安装Build Toos for Visual Studio,安装英文语言包(否则运行vcpkg会报错,安装不了) https://visualstudio.microsoft.com/downloads/
在页面中找到 Build Tools for Visual Studio 2019,下载安装,为
3、下载vcpkg https://github.com/microsoft/vcpkg
下载之后运行:bootstrap-vcpkg.bat
然后在powershell中切换到vcpkg的目录运行下面命令:
.\vcpkg integrate install
.\vcpkg.exe install opencl
.\vcpkg.exe install opencl:x64-windows
安装时间比较长,最好开代理,powershell下也可以设置代理环境变量
$proxyString = "http://127.0.0.1:1080"
$Env:HTTP_PROXY = $proxyString
$Env:HTTPS_PROXY = $proxyString
4、打开vs2019创建空项目开始愉快的Opencl学习开发吧
确认项目属性是否有vcpkg库管理的导入
简洁记录,仅供参考