bug1:The given version [11] is not supported, only version 1 to 7 is supported in this build.
It should have loaded this file in C:\Windows\System32\, because I was using version 1.6 before, and the one under the C drive was not replaced, which caused the error. You can replace the latest one, or just place the file in the same directory as the compiled .exe.
Build onnxruntime's c++ reasoning environment for windows
1. download the compiled onnxruntime library.link (on a website)
2. Open the VS property page, set the configuration (I usually release directly), platform (I directly X64), find c/c++ -> General -> Additional Include Directory. Add onnxruntime-win-x64-gpu-1.15.0\include path to it.
3. Open the property page of VS and find Linker->Input->Additional Dependencies. Add onnxruntime-win-x64-gpu-1.15.0\lib\ path to it.
4. In the cpp file, add the library: #include<onnxruntime_cxx_api.h>