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.

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

Alves_Tasca__Arthur
2,143 Views

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/sertupvars.sh

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

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

0 Kudos
2 Replies
Cary_P_Intel1
Employee
2,143 Views

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 "build_samples.sh" 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
Marcia_W_Intel
Employee
2,128 Views

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
Reply