我使用apt命令在我的Ubuntu20.04上安装了OpenVino。
sudo apt install intel-openvino-dev-ubuntu20-2021.3.394我正在尝试使用gcc 1.c -linference_engine_c_api编译这个简单的程序。
#include <stdio.h>
#include <c_api/ie_c_api.h>
int main() {
printf("C API Successfully Loaded!");
}但编译失败,并显示以下错误:
1.c:2:10: fatal error: c_api/ie_c_api.h: No such file or directory
2 | #include <c_api/ie_c_api.h>
| ^~~~~~~~~~~~~~~~~~
compilation terminated.我该如何解决这个问题?
发布于 2021-05-20 16:57:26
不能直接为1.c文件调用gcc。您需要创建一个脚本来编译必要的依赖项(如CMake)。
例如,在\opt\intel\openvino_2021.3.394\deployment_tools\inference_engine\samples\c中有build_sample.h脚本。此脚本用于执行所有编译,并使用CMake。gcc也是如此,要运行推理库,您需要在调用ie_c_api.h之前首先编译脚本。当gcc编译器不支持该操作时,不能直接运行1.c文件。
请访问Integrate the Inference Engine with Your Application - OpenVINO™ Toolkit (openvinotoolkit.org)进行参考。
https://stackoverflow.com/questions/67547059
复制相似问题