OpenCV 4.7 C++17 Windows 10 - imread warn cutoff, empty return

you need a DEBUG build of the opencv libs for that.

this is indeed the most interesting question here !

is there any chance, you made a mess in your VS project ?
opencv actually only requires c++11. what happens, if you restrict it to that (instead of c++17) ?