Modify the cmakelist file as follows:
cmake_minimum_required(VERSION 3.17)
project(untitled)
set(CMAKE_CXX_STANDARD 14)
find_package( OpenCV REQUIRED )
include_directories(${OpenCV_INCLUDE_DIRS})
add_executable(untitled main.cpp)
target_link_libraries(untitled ${OpenCV_LIBS} )
Read More:
- error: non-const lvalue reference to type cannot bind to a value of unrelated type
- The solution of undefined reference to error
- Keil :error: identifier “int8_ T “is undefined
- Keil : error: identifier “int8_ T “is undefined
- C++ compiler prompt “undefined reference to…”[How to Fix]
- main.cpp : (. Text + 0xd06): undefined reference to XX method | simple record
- Solutions for undefined reference to ‘xxx’ encountered during linking
- (-215:Assertion failed) 0 <= contourIdx && contourIdx < (int)last in function ‘cv::drawContours‘
- Vitis: platform out of date, makefile error at compile time; The modified application compiles to undefined reference
- make Error: error: cast from ‘int32_t*’ {aka ‘int*’} to ‘int’ loses precision [-fpermissive]
- Python: How to Fix “Ord() expected string of length 1, but int found”
- undefined reference to `pthread_create’ collect2: ld returned 1 exit status
- undefined reference to `WinMain‘collect2.exe: error: ld returned 1 exit status
- TypeError: int() can’t convert non-string with explicit base
- [Solved] undefined reference to ‘cv::xfeatures2d::SIFT::create(…)’
- In function `_start’ undefined reference to `main’ error: ld returned 1 exit status
- AttributeError: module ‘cv2.cv2‘ has no attribute ‘face‘
- Error: undefined reference to ‘CV:: xxx’ encountered in using OpenCV in QT
- Solving CodeBlocks OpenGL glew undefined reference to`_ imp__ Glewinit ‘error