Issue 1:
System information (version)

OpenCV => 4.5.2

Operating System / Platform => Windows 10 64bit

Compiler => MSVC 2019

Options: Qt5

Detailed description

While highgui compilation it issues

window.obj : error LNK2019: unresolved external symbol "double __cdecl cvGetPropVsync_W32(char const *)" (?cvGetPropVsync_W32@@YANPEBD@Z) referenced in function "double __cdecl cv::getWindowProperty(class std::
basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int)" (?getWindowProperty@cv@@YANAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z) [D:\CPPLIBS\sources\op
encv\build\modules\highgui\opencv_highgui.vcxproj]
window.obj : error LNK2019: unresolved external symbol "void __cdecl cvSetPropVsync_W32(char const *,bool)" (?cvSetPropVsync_W32@@YAXPEBD_N@Z) referenced in function "void __cdecl cv::setWindowProperty(class st
d::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int,double)" (?setWindowProperty@cv@@YAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@HN@Z) [D:\CPPLIBS
\sources\opencv\build\modules\highgui\opencv_highgui.vcxproj]
D:\CPPLIBS\sources\opencv\build\bin\Release\opencv_highgui452.dll : fatal error LNK1120: 2 unresolved externals [D:\CPPLIBS\sources\opencv\build\modules\highgui\opencv_highgui.vcxproj]

Two symbols cvSetPropVsync_W32 and cvGetPropVsync_W32 are missing. those are defined in window_w32.cpp but not included to the build.

Issue 2:
System information (version)

OpenCV => 4.5.2 static library

Operating System / Platform => Windows 64 Bit

Compiler => Visual Studio 2019

Detailed description

I have a application use highgui, but when I upgrade opencv from 451 to 452, a LNK2019 error come out:

1>opencv_highgui452.lib(window.obj) : error LNK2019: 无法解析的外部符号【unresolved external symbol】 "double __cdecl cvGetPropVsync_W32(char const *)" (?cvGetPropVsync_W32@@YANPEBD@Z)，函数【Function】 "double __cdecl cv::getWindowProperty(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int)" (?getWindowProperty@cv@@YANAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z) 中引用了该符号 1>opencv_highgui452.lib(window.obj) : error LNK2019: 无法解析的外部符号 "void __cdecl cvSetPropVsync_W32(char const *,bool)" (?cvSetPropVsync_W32@@YAXPEBD_N@Z)，函数 "void __cdecl cv::setWindowProperty(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int,double)" (?setWindowProperty@cv@@YAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@HN@Z) 中引用了该符号

cvGetPropVsync_W32 and cvSetPropVsync_W32 is define in highgui/src/precomp.hpp, both of them is only defined but without implement.

double cvGetPropVsync_W32(const char* name);
void cvSetPropVsync_W32(const char* name, const bool enabled);

So I delete them in opencv source code and build highgui module again, then LNK2019 don't happen and complie success:

highgui/src/window.cpp, Line195

//case cv::WND_PROP_VSYNC:
// #if defined (HAVE_WIN32UI)
// cvSetPropVsync_W32(name, (prop_value != 0));
// #else
// // not implemented yet for other toolkits
// #endif
//break;

highgui/src/window.cpp, Line193

//case cv::WND_PROP_VSYNC:
// #if defined (HAVE_WIN32UI)
// return cvGetPropVsync_W32(name);
// #else
// return -1;
// #endif
//break;