# OpenCV build error LNK2001: unresolved external symbol "public: \_\_cdecl cv::Mat::Mat(void)"

**URL:** https://forum.opencv.org/t/opencv-build-error-lnk2001-unresolved-external-symbol-public-cdecl-cv-mat-void/19695
**Category:** C++
**Tags:** windows, cmake
**Created:** [January 6, 2025, 10:12am UTC](https://forum.opencv.org/t/opencv-build-error-lnk2001-unresolved-external-symbol-public-cdecl-cv-mat-void/19695 "2025-01-06T10:12:36Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Sergey\_Kurchatov](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/sergey_kurchatov/32/11763_2.png) [@Sergey\_Kurchatov](https://forum.opencv.org/u/Sergey_Kurchatov)
#### Post date: [January 6, 2025, 10:12am UTC](https://forum.opencv.org/t/opencv-build-error-lnk2001-unresolved-external-symbol-public-cdecl-cv-mat-void/19695/1 "2025-01-06T10:12:36Z")

</div>

Hi all,  
I have downloaded opencv-4.9.0-windows.exe,  
then I generate the code with CMake (no errors),  
then I open solution OpenCV.sln and choose “Rebuild all”  
The compilation is Ok but there are LNK2001 error  
Namely “public: \_\_cdecl cv::Mat::Mat(void)” function definition is not found.  
The “Fild in files” also does not find the function definition

Any ideas?

---

<div class="post-metadata">

### Author: ![Sergey\_Kurchatov](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/sergey_kurchatov/32/11763_2.png) [@Sergey\_Kurchatov](https://forum.opencv.org/u/Sergey_Kurchatov)
#### Post date: [January 7, 2025, 7:33am UTC](https://forum.opencv.org/t/opencv-build-error-lnk2001-unresolved-external-symbol-public-cdecl-cv-mat-void/19695/2 "2025-01-07T07:33:23Z")

</div>

I have downloaded opencv-4.8.0.zip  
and the build (the same steps) is successful

So there is a bug in opencv-4.9.0-windows.exe
