Reason: the cmakelists.txt file does not specify the DNN module, so the statement
find_package(OpenCV 4 REQUIRED opencv_core opencv_imgproc opencv_highgui opencv_calib3d opencv_videoio opencv_imgcodecs )
To be amended as follows:
find_package(OpenCV 4 REQUIRED)
It can be compiled.
Read More:
- Cv2.dnn read model error [How to Solve]
- [Solved] Compile Error: undefined reference to `google::FlagRegisterer::FlagRegisterer
- [Solved] failed to req API:localhost:8848/nacos/v1/ns/instance. code:500 msg: java.net.ConnectException
- [Solved] net core HTTP Error 500.31 – Failed to load ASP.NET Core runtime HTTP Error 500.30 – ASP.NET Core
- [Solved] Asp.Net Core IIS Error: HTTP Error 500.30 – ASP.NET Core app failed to start
- [Solved] PCL Compile Error: undefined reference to `pcl::PCLBase<pcl::PointXYZRGBA>:: XXX
- package golang.org/x/net/XXX: unrecognized import path “golang.org/x/net/xxx“…
- [Solved] Opencv Compile Error: (CMake Error: The following variables are used in this project, but they are set to not)
- Clion new method shows undefined reference to solution
- [Solved] Qt Error: undefined reference to xxxxx
- error: undefined reference to `calculate()` [How to Solve]
- [Solved] cortex_M3 freeRTOS Error: undefined reference to `_sbrk‘
- [Solved] C++ error: undefined reference to `xxx‘
- The problem of using GB2312 encoding in .NET Core to report errors
- Keytool: How to solve javax.net.ssl.SSLHandshakeException Error?
- How to parse JSON string in.Net [error reading job object from jsonreader. Current jsonreader item is not an obj]
- C++Qt development – Qtsocket programming error: undefined reference to `_imp__WSAStartup
- How to Solve Chrome Error: net::ERR_FAILED
- [Solved] java.lang.reflect.InaccessibleObjectException: Unable to make protected java.net.http.HttpRequest()…
- [Solved] QT error: error: undefined reference to ` VTable`