Не удалось запустить функции opencv C++ в блоках кода.C++

Программы на C++. Форум разработчиков
Ответить
Гость
 Не удалось запустить функции opencv C++ в блоках кода.

Сообщение Гость »


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 ? I have added some screenshots for your reference. Kindly help me with this.


Источник: https://stackoverflow.com/questions/781 ... ode-blocks
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «C++»