Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.
6404 Discussions

#include <ie_core.hpp> no such file or directory


I am running an Ubuntu 18.04.3 LTS with OpenVino installed at /opt/intel/openvino_2019.3.334. I am getting started with OpenVino in C++ and I have been running into error while trying compile a file with:

#include <ie_core.hpp>

the error retrieved is:

my_ie_test.cpp:3:10: fatal error: inference_engine.hpp: No such file or directory
 #include <inference_engine.hpp>

Moreover, I have successfully completed and tested the installation test described in the installation guide. I have also payed attention to add to ~/.bashrc the line

source /opt/intel/openvino_2019.3.334/bin/

And my terminal is being intiallized with the message "[] OpenVINO environment initialized".

Why can't I import this file and how can I solve this issue?

0 Kudos
2 Replies

Hi, Arthur,

There are two ways to write your own code then compile with the right environment setting.

1. add your code under the "<OpenVINO_root>/inference_engine/samples" by creating a new folder and put your code into the folder, and copy the CMakeLists.txt file from any of the sample existing to your folder, then change the name within the "ie_add_sample" macro.

For example, if you create your sample as "my_ie_test" so you create a folder under the samples named "my_ie_test" and with your own source code named "my_ie_test.cpp", then you copy the CMakeLists.txt from "hello_query_device" to your folder. What you need to change is as below, then run the "" again, you will see the binary built.

ie_add_sample(NAME my_ie_test SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/my_ie_test.cpp")

2. Leverage the find_package(InferenceEngine) in CMakeLists.txt file as what I made attached in the zip file, then you can build it from wherever you want.

0 Kudos

Thanks for the files.

FYI to devs using option #2

in the CMakeLists.txt file... 

"test" is reserved, so change this name for your project.

0 Kudos