version [20] is not available,only API versions[1,17] are supported in this build.解决头文件和库不匹配问题
解决The requested API version [20] is not available, only API versions [1, 17] are supported in this build. Current ORT Version is: 1.17.1
·
编译器:VS2022
开发环境:Win11
报错信息:

解决方法
1、先去C:\Windows\System32这个路径查看是不是有onnxruntime.dll文件,这个文件在编译的时候会优先被检索导致报错

2、去自己下载的onnxruntime包里复制一个onnxruntime.dll
我的路径是:E:\C++ Library Functions\onnxruntime-win-x64-1.20.1\lib

3、黏贴到项目路径的x64/Debug里面

重新运行即可
更多推荐


所有评论(0)