cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
stzog
Explorer
Explorer
620 Views
Registered: ‎02-07-2020

Vitis Vision Libraries error on build

Jump to solution

Hi to all!

I have installed Vitis Vision Libraries examples  and when i try to build in vitis i get the following error....

/home/stavros/pfm2/dilation/libs/xf_opencv/L1/include/common/xf_headers.hpp:23:10: fatal error: opencv2/opencv.hpp: No such file or directory
   23 | #include "opencv2/opencv.hpp"
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.

To mention that i have installed opencv 3.4 and the opencv.hpp exists in the folder opencv2....Why cannot find it?

Any help guys? 

0 Kudos
1 Solution

Accepted Solutions
Davix
Contributor
Contributor
540 Views
Registered: ‎11-18-2020

If you use Vitis Gui you must right click on the project shown in the Assistant panel and go to settings. On the left side you have to open your project and you will find three sub-section. You have to open the sections with the label "<your_project>_kernels" and "<your_project>" and select one of SW_EMU/HW_EMU/HW (it depend on the purpose you are compiling for), and click on "edit toolchain compiler settings". Under "Tool Settings" section, select the folder includes and, on the right, add the path as i mentioned before (in this case you don't have to add the -I because it will do automatically). I also suggest you to go in the libraries folder, which is just below, and add the path to the opencv libraries, and the common libraries of opencv (core, imgproc, imgcodecs). I recommend to to this procedure for both section i mentioned before, which are "<your_project>_kernels" and "<your_project>". Then click apply and close and build your project.

View solution in original post

8 Replies
Davix
Contributor
Contributor
614 Views
Registered: ‎11-18-2020

Hi @stzog ,

I already faced this kind of problem. I solved it simply including the path of the opencv2 folder into the CFLAGS of the project. Hope this can help.

0 Kudos
stzog
Explorer
Explorer
603 Views
Registered: ‎02-07-2020

@Davix Thanks a lot for your answer.

Can you be more specific how to do this?

0 Kudos
Davix
Contributor
Contributor
561 Views
Registered: ‎11-18-2020

If you are using Vitis hls gui, you can change the settings of your project by right click on you project and choose settings. On the right of the panel, go to simulation/synthesis, click on the file you have and click "CFLAGS" on the left side. Than you have to include the path of your opencv2 folder inserting the following: "-I <path_to_opencv2_folder>". For example, if the path of your opencv2 folder is /home/user/Documents/opencv2, you have to insert "-I /home/user/Documents/"

0 Kudos
stzog
Explorer
Explorer
545 Views
Registered: ‎02-07-2020

@Davix 

Hi my friend

I use Vitis Gui and not Vitis Hls.Is there any difference?

0 Kudos
Davix
Contributor
Contributor
541 Views
Registered: ‎11-18-2020

If you use Vitis Gui you must right click on the project shown in the Assistant panel and go to settings. On the left side you have to open your project and you will find three sub-section. You have to open the sections with the label "<your_project>_kernels" and "<your_project>" and select one of SW_EMU/HW_EMU/HW (it depend on the purpose you are compiling for), and click on "edit toolchain compiler settings". Under "Tool Settings" section, select the folder includes and, on the right, add the path as i mentioned before (in this case you don't have to add the -I because it will do automatically). I also suggest you to go in the libraries folder, which is just below, and add the path to the opencv libraries, and the common libraries of opencv (core, imgproc, imgcodecs). I recommend to to this procedure for both section i mentioned before, which are "<your_project>_kernels" and "<your_project>". Then click apply and close and build your project.

View solution in original post

stzog
Explorer
Explorer
533 Views
Registered: ‎02-07-2020

Many many thanks i wil try it!!!

The strange thing is that in my other laptop with same setup the examples runs without problem....

0 Kudos
stzog
Explorer
Explorer
493 Views
Registered: ‎02-07-2020

@Davix 

Now i get the following error....

Screenshot from 2021-01-12 20-14-22.pngScreenshot from 2021-01-12 20-13-38.png

0 Kudos
Davix
Contributor
Contributor
473 Views
Registered: ‎11-18-2020

can you post the entire errors?

0 Kudos