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.
6392 Discussions

error when I build my project using inference engine

hezhexi2002
Beginner
1,755 Views

here is the error:

hezhexi2002_0-1646617544973.png

I have searched for it with google and most answer is

that I forgot the semi colon at the end of your header file,However,I checked my header file and found there already is a semi colon at the end of itself.So I want someone to help me to get rid of this stupid error,all my project files are attached below.I would appreciate it if someone can give me the solutions!

0 Kudos
11 Replies
Iffa_Intel
Moderator
1,676 Views

Hi,


just to clarify, did you get this error when you build the samples without your custom code? (this is to assess the origin of the issue)



Sincerely,

Iffa


0 Kudos
hezhexi2002
Beginner
1,660 Views

Hi,thank you for your reply,I haven't try it without my custom code but I used to run it on ubuntu and it works when I use the full path of my custom xml,However,I will get this error when I compile with msvc using VS2017 in debug x64 mode:

hezhexi2002_1-1646739471300.png

 

Besides,I found it seems like a bug when innitialize InferenceEngine::Core on windows as the links below:[Bug]Cannot initialize InferenceEngine::Core · Issue #5581 · openvinotoolkit/openvino · GitHub.I'd like to try it on ubuntu soon and then report you again!

 
0 Kudos
Iffa_Intel
Moderator
1,585 Views

I asked because the sjtu.h, sjtu.hpp, sjtu.cpp files seem like custom files/codes to me.

 

Did you get the Openvino packages from the official site/URL?

Which version are you using (the latest is 2021.4.2)?

There are 3 options to officially install them (installation package, install from images or repo, build from source). You may refer here. (make sure you have all the pre-requisites installed too).

 

Usually, issues of using OpenVINO with Visual Studio happen because they are not properly set up. Compiling through Visual Studio instead CMD/terminal is not a straightforward process since you need to do some setup beforehand. Here is how you can link the OpenVINO libraries/dll with Visual Studio.

 

Sincerely,

Iffa

0 Kudos
hezhexi2002
Beginner
1,579 Views

I install the openvino through installation package and the version is 2021.4.752

0 Kudos
Iffa_Intel
Moderator
1,560 Views

Please make sure that you had properly linked the OpenVINO libraries/dll with Visual Studio as in Here.



Sincerely,

Iffa


0 Kudos
hezhexi2002
Beginner
1,487 Views

Thank for your sincere help and I have follow the instructions in the video you have mentioned above but the version of the openvino in the video is 2019 and there is something different between my CMaKeLists.txt and his file.Whatever I have genereted my vs solution and I will try it again to ensure if it works

0 Kudos
hezhexi2002
Beginner
1,473 Views

Hi,as you can see I still get this error when I try to run it again:

hezhexi2002_0-1646831350427.png

and my xml has been read correctly so what's the problem of it,is it really a bug on win?

0 Kudos
Iffa_Intel
Moderator
1,340 Views

Hi,


thank you for your patience.

We'll check the integration from our side and get back to you as soon as possible.



Sincerely,

Iffa


0 Kudos
hezhexi2002
Beginner
1,329 Views

ok,I will wait for your reply,thank you for your sincere help

0 Kudos
Iffa_Intel
Moderator
1,310 Views

Hi,

 

I tried to create my own project based on OpenVINO samples and I managed to do so without issues.

 

These are the steps:

1. Install OpenVINO and its pre-requisites

2. Run setupvars.bat and try to run a readily available sample to ensure it really works

3. Create a backup folder for the original sample 

4. Delete all other sample files except these:

Files.png

5. If you change the sample application name, the CMakeLists.txt needs to be changed too. (For my case, I didn't)

6. Build the sample

build.png

build2.png

7. Open the generated binaries (Samples.sln) from the Document location ( .../Documents/Intel/OpenVINO/inference_engine_cpp_samples_build)

Only 1 sample is available now as expected

 

sln.png

 

8. Set the project as startup project

startup.png

From this point onward, you can start customizing the code accordingly, and bear in mind that any error that comes up from here is related to your changes (not the official OpenVINO issues). Hence, you’ll need to debug & fix the error.

This is the easiest way because it already has the required path/dll linked where you don't have to manually set them.

You'll need to run the setupvars.bat before inferencing or etc.

(optional) You can Create a batch file to initialize OpenVINO™ environment and launch Integrated Development Environment (IDE), (eg: VS2019):

@Echo on
cd \bin
CALL setupvars.bat
cd \2019\Community\Common7\IDE
CALL devenv.exe

Run the .bat file as administrator

 

Previously, some issues come up when msvc 2017 is used instead of 2019. It would be best if you could use 2019 version.

 

Sincerely,

Iffa

0 Kudos
Iffa_Intel
Moderator
1,215 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


0 Kudos
Reply