It goes: [ WARN 0@0.840] global loadsave.cpp:244 cv::findDecoder imread_('
…with no filename at all.
I explicitly check that the file exists with the C++17 std::filesystem::exists() func, with the file path (roughly) declared as: const String image_path = String("C:/Users/user/repository/image.jpg")'
Then, I just call it like: Mat image = imread(image_path, IMREAD_UNCHANGED);
It then returns an empty Mat object.
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) ?
I even just now attempted to emulate the source code exactly by doing:
FILE* f = fopen(filename.c_str(), "rb");
if (f) {
cout << "Opened file just fine!" << endl;
}
This opened a handle to the file just fine.
Reverting my Visual Studio 2022 to C++14 still has the same error…and I’m not a fan of the idea of trying to install an old Visual Studio to test C++11.