Can't open/read file: check file path/integrity

Hello friends. The following program WORKED to read image files, but it stopped working and gave the following error:

global loadsave.cpp:268 cv::findDecoder imread_(''): can't open/read file: check file path/integrity

#include <opencv2/imgcodecs.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/imgproc.hpp>
#include <iostream>

using namespace cv;
using namespace std;

Mat img;

int main() {
    cout << "Iniciando meu primeiro projeto com OpenCV\n";

    // string imagename = "C:\\opencv\\sources\\samples\\data\\lena.jpg";
    string imagename = "D:\\imgteste\\test.png";
    img = imread(imagename, IMREAD_COLOR);

    if (img.empty())
    {
        cout << "Nao foi possivel abrir/ler a imagem : " << imagename << endl;
        return 1;
    }
    imshow("Imagem da famosa Lena", img);
    waitKey(0);
}

Windows 11 and Visual Studio Community updated
Windows 11 - Visual Studio Community 2022 - OpenCV 10.0.0
Anyone with the same problem, or suggestion?

you are mixing release and debug.

if you build your own program as “release”, you have to link the release build of opencv.

if you build your own program as “debug”, you have to link the debug build of opencv.

that’s the libs that have an extra d at the end of their names

I changed it as per your guidance. Problem solved. THANK YOU SO MUCH.