I have downloaded and extracted the latest opencv-4.9.0 and installed latest code blocks-20.03.
When I tried to use the opencv functions like waitKey(), imread, imshow() to load an image and to display, after including the paths in the build option, I am getting various errors,
||=== Build: Debug in load_image (compiler: GNU GCC Compiler) ===|
ld.exe||cannot find -lopencv_core|
ld.exe||cannot find -lopencv_highgui|
ld.exe||cannot find -lopencv_imgproc|
ld.exe||cannot find -lopencv_calib3d|
ld.exe||cannot find -lopencv_ml|
ld.exe||cannot find -lopencv_stitching|
ld.exe||cannot find -lopencv_cudaarithm|
ld.exe||cannot find -lopencv_cudabgsegm|
ld.exe||cannot find -lopencv_cudacodec|
ld.exe||cannot find -lopencv_features2d|
ld.exe||cannot find -lopencv_xfeatures2d|
ld.exe||cannot find -lopencv_contrib|
ld.exe||cannot find -lopencv_videoio|
||error: ld returned 1 exit status|
||=== Build failed: 14 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|
I have made changes ad below, build options -> search directories -> compiler -> "C:\Users\Admin\Downloads\opencv\build\include
build options -> Linker settings -> (.lib)
I am getting the following compilation errors After including both the headers and the .lib files
What I have to do to run opencv functions in code blocks successfully?


