我正在尝试在Linux上从源代码构建onnxruntime。根据这个instruction,我已经成功地构建了python轮子和共享库。但是我还没有看到C API的头文件。
有一个构建选项--build_csharp,它似乎可以启用C#/C包。我试图添加此选项,但得到以下错误。
CMake Warning at CMakeLists.txt:137 (message):
Language Csharp is not found in the system我安装了dotnet-sdk-3.1,但仍然收到这个错误。我能问一下如何在Linux上正确地生成onnxruntime C API吗?谢谢!
发布于 2020-11-11 17:12:23
请尝试以下步骤:
- Steps to build ONNX from source code:
1. git clone --recursive https://github.com/Microsoft/onnxruntime
2. Get the commit ID of the version you want to build (In case you want older version)
3. git checkout "your commitID"
4. Install the required version of Cmake on your system
6. Run: <path>\build.sh --config Release --build_shared_lib --parallel
7. A build folder will be created in the onnxruntime.
5. Get the onnxruntime.dll from the dir: \onnxruntime\build\Windows\Release\Release
6. Get the required headers (onnxruntime_c_api.h, onnxruntime_cxx_api.h, onnxruntime_cxx_inline.h)
from the dir: \onnxruntime\include\onnxruntime\core\session and put it in the unit location.https://stackoverflow.com/questions/62617626
复制相似问题