Skip to content

build: fix declaration mismatch for unity builds on Windows - #5360

Merged
lgritz merged 1 commit into
AcademySoftwareFoundation:mainfrom
lgritz:lg-exrlinkage
Aug 3, 2026
Merged

build: fix declaration mismatch for unity builds on Windows#5360
lgritz merged 1 commit into
AcademySoftwareFoundation:mainfrom
lgritz:lg-exrlinkage

Conversation

@lgritz

@lgritz lgritz commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

Windows Unity builds might combine exrinput.cpp and exrinput_c.cpp into one translation unit. The forward declaration in exrinput.cpp lacked OIIO_EXPORT while the definition in exrinput_c.cpp has it, causing MSVC error. I'm not sure why this never failed before today!

Assisted-by: Claude Code / Sonnet 5

Windows Unity builds might combine exrinput.cpp and exrinput_c.cpp
into one translation unit. The forward declaration in exrinput.cpp
lacked OIIO_EXPORT while the definition in exrinput_c.cpp has it,
causing MSVC error. I'm not sure why this never failed before today!

Assisted-by: Claude Code / Sonnet 5

Signed-off-by: Larry Gritz <lg@larrygritz.com>
@lgritz lgritz changed the title fix(openexr): fix declaration mismatch for unity builds on Windows build: fix declaration mismatch for unity builds on Windows Aug 2, 2026
@lgritz lgritz added build / testing / port / CI Affecting the build system, tests, platform support, porting, or continuous integration. windows Problems specific to MS Windows OS labels Aug 2, 2026

@grdanny grdanny left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so we are just matching this with the actual definition that's in exrinput_c?
sounds reasonable...

@lgritz

lgritz commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator Author

so we are just matching this with the actual definition that's in exrinput_c?

Yes, exactly. This macro turns into nothing on non-Windows platforms. But on Windows, it needs to match.

@lgritz
lgritz merged commit f0810af into AcademySoftwareFoundation:main Aug 3, 2026
29 checks passed
@lgritz
lgritz deleted the lg-exrlinkage branch August 3, 2026 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build / testing / port / CI Affecting the build system, tests, platform support, porting, or continuous integration. windows Problems specific to MS Windows OS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants