vsg-dev/vsgXchange

OpenEXR reader cannot be built on Mac and Windows 10

Closed this issue · 10 comments

Hi Robert,

the new OpenEXR reader code breaks the builds on MacOS 12.4 and Windows 10 with VS2022. The reason seems to be the same.
xchange_win_err.txt
xchange_max_err.txt

I had a quick look. Mostly looks to be a OpenEXR version issue rather than platform one. Which version of OpenEXR are you building against on Windows and MacOS?

I am using OpenEXR 3.1.5 on both systems.

I was able to make the build possible again. For Windows line 465 had to be changed from Imf::InputFile file(filenameToUse.c_str()); to Imf::InputFile file(filenameToUse.string().c_str());. Replacing Imf::Int64 by uint64_t did the rest on both machines. Now I have successful builds, but unfortunately only the Mac build can also read exr files. See attachments.
openexr.cpp.zip
sample_1280×853.exr.zip

On Windows there is only an error message like "this file could not be read".

Thanks, I loaded the last commits on Mac and Windows, both builds were successful. To my surprise I could read the sample exr file on both machines. There must be some magic in the game!