Intel® Distribution of OpenVINO™ Toolkit
Community support and discussions about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all things computer vision-related on Intel® platforms.
5841 Discussions

failing to do openvino inference using c language

muleymakarand
Novice
201 Views

Hi,

 

I have converted my ML model using a model optimizer. My project is developed in C language and my model will be part of this project. I am trying to load the model using openvino C API.

Below are my project details

Development Environment - Visual Studio 2019

OpenVino Version - 2021 version 3

 

I have provided the following paths in visual studio project properties:-

Exectuable Directories

C:\Program Files (x86)\Intel\openvino_2021.3.394\inference_engine\bin\intel64\Debug;C:\Program Files (x86)\Intel\openvino_2021.3.394\inference_engine\bin;C:\Program Files (x86)\Intel\openvino_2021.3.394\opencv\bin;$(ExecutablePath)

 

Include Directories

C:\Program Files (x86)\Intel\openvino_2021.3.394\deployment_tools\inference_engine\include;C:\Program Files (x86)\Intel\openvino_2021.3.394\opencv\include;$(IncludePath)

 

Library Directories

C:\Program Files (x86)\Intel\openvino_2021.3.394\deployment_tools\inference_engine\lib\intel64\Debug;$(LibraryPath)

 

My code:-

my code attempts to load model using OpenVino C API

Below is my code

 

int main(int argc, char** argv) {
// ------------------------------ Parsing and validation of input args ---------------------------------
if (argc != 4) {
printf("Usage : ./hello_classification <path_to_model> <path_to_image> <device_name>\n");
return EXIT_FAILURE;
}

const char* input_model = argv[1];
const char* input_image_path = argv[2];
const char* device_name = argv[3];
ie_core_t* core = NULL;
ie_network_t* network = NULL;
ie_executable_network_t* exe_network = NULL;
ie_infer_request_t* infer_request = NULL;
char* input_name = NULL, * output_name = NULL;
ie_blob_t* imgBlob = NULL, * output_blob = NULL;
// -----------------------------------------------------------------------------------------------------

// --------------------------- 1. Load inference engine instance -------------------------------------

IEStatusCode status = ie_core_create("", &core);
if (status != OK) {
printf("Failed to create");
return -1;
}
Note: I am following hello_classification example step by step

 

I get following error

LNK 2019 unreolved external symbol __imp_ie_core_create referenced in funtion _main

 

I know I am missing the linking of some libraries. Maybe I am missing some path that needs to be included in project properties. Can anyone guide me on this?

0 Kudos
2 Replies
Iffa_Intel
Moderator
171 Views

Hi,


The error you mentioned is related to the Visual Studio linker.

You may try to apply this solution



Sincerely,

Iffa



Iffa_Intel
Moderator
145 Views

Greetings,


Intel will no longer monitor this thread since we have provided a solution. If you need any additional information from Intel, please submit a new question. 



Sincerely,

Iffa


Reply