There is no error building opencv using lastest version with VS2022 Which opencv version did you build?