UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor vijayve
Visitor
6,868 Views
Registered: ‎04-22-2013

Compilation error when using OpenCV library with Vivado HLS

Hi

 

I am trying to run the sample example provided to us by Xilinx which makes use of OpenCV library function calls when run using Vivado HLS 2013.1.

 

I am following the video posted by Xilinx at

 

http://www.youtube.com/watch?v=Y2iHh-HtXn4

 

But when I try to Build the sample design,I get the below errors.

 

Starting C simulation ...
C:/Xilinx/Vivado_HLS/2013.1/Win_x86/bin/vivado_hls_bin.exe -flow csim -flow_args " -clean -setup"
@I [LIC-101] Checked out feature [VIVADO_HLS]
@I [HLS-10] Running 'C:/Xilinx/Vivado_HLS/2013.1/Win_x86/bin/vivado_hls_bin.exe'
            for user 'xyz' on host 'xyz' (Windows NT_intel version 6.1) on Mon Apr 22 16:20:20 -0700 2013
            in directory 'C:/Users/xyz/test14/solution1'
   Compiling C:/Users/xyz/Documents/xapp1167/xapp1167/sw/demo/test.cpp in debug mode
   Compiling C:/Users/xyz/Documents/xapp1167/xapp1167/sw/demo/top.cpp in debug mode
   Generating csim.exe
C:/Users/xyz/test14/solution1/csim/build/obj/test.o: In function `main':
C:/Users/xyz/Documents/xapp1167/xapp1167/sw/demo/test.cpp:49: undefined reference to `cvLoadImage'
C:/Users/xyz/Documents/xapp1167/xapp1167/sw/demo/test.cpp:50: undefined reference to `cvGetSize'
C:/Users/xyz/Documents/xapp1167/xapp1167/sw/demo/test.cpp:50: undefined reference to `cvCreateImage'
C:/Users/xyz/Documents/xapp1167/xapp1167/sw/demo/test.cpp:59: undefined reference to `cvSaveImage'
C:/Users/xyz/Documents/xapp1167/xapp1167/sw/demo/test.cpp:61: undefined reference to `opencv_image_filter(_IplImage*, _IplImage*)'
C:/Users/xyz/Documents/xapp1167/xapp1167/sw/demo/test.cpp:62: undefined reference to `cvSaveImage'
C:/Users/xyz/Documents/xapp1167/xapp1167/sw/demo/test.cpp:64: undefined reference to `cvReleaseImage'
C:/Users/xyz/Documents/xapp1167/xapp1167/sw/demo/test.cpp:65: undefined reference to `cvReleaseImage'
C:/Users/xyz/test14/solution1/csim/build/obj/test.o: In function `Z17IplImage2AXIvideoILi32EEvP9_IplImageRN3hls6streamI7ap_axiuIXT_ELi1ELi1ELi1EEEE':
C:/Xilinx/Vivado_HLS/2013.1/include/hls_opencv.h:129: undefined reference to `cvGet2D'
C:/Users/xyz/test14/solution1/csim/build/obj/test.o: In function `Z17AXIvideo2IplImageILi32EEvRN3hls6streamI7ap_axiuIXT_ELi1ELi1ELi1EEEEP9_IplImage':
C:/Xilinx/Vivado_HLS/2013.1/include/hls_opencv.h:235: undefined reference to `cvSet2D'
collect2: ld returned 1 exit status
make: *** [csim.exe] Error 1
@E [SIM-1] CSim file generation failed: compilation error(s).
@I [LIC-101] Checked in feature [VIVADO_HLS]

 

What is the reason for this?

 

Thank you

 

0 Kudos
1 Reply
Xilinx Employee
Xilinx Employee
6,855 Views
Registered: ‎10-10-2012

Re: Compilation error when using OpenCV library with Vivado HLS

1. It looks like you do not have OpenCV library installed or vivado_hls cannot find where it is.

2. To re-run the reference design in Windows, it is recommended to execute the batch file "Video_library_Windows.bat" provided. Note: according to your install directory, it might be necessary to change the line 2 of the batch file to:
set VIVADO_HLS_HOME=C:\Xilinx\Vivado_HLS\2013.1\Win_x86
0 Kudos