You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi!
When building OCIO with shared libs on windows it fails to link correctly with Imath.
I get the following when building with Imath 3.1.10, OpenExr 3.2.1 and OpenColorIO 2.3.2
Lut1DOpData.obj : error LNK2001: unresolved external symbol imath_half_to_float_table
OpHelpers.obj : error LNK2001: unresolved external symbol imath_half_to_float_table
CPUProcessor.obj : error LNK2001: unresolved external symbol imath_half_to_float_table
FileFormatDiscreet1DL.obj : error LNK2001: unresolved external symbol imath_half_to_float_table
MathUtils.obj : error LNK2001: unresolved external symbol imath_half_to_float_table
Lut1DOpCPU.obj : error LNK2001: unresolved external symbol imath_half_to_float_table
..\vfxplatform_build\build\OpenColorIO\src\OpenColorIO\Release\OpenColorIO_2_3.dll : fatal error LNK1120: 1 unresolved externals
This seem to be a common issue with Imath and I think the solution is to define IMATH_DLL when needed, but I'm not sure where or with what logic it should be defined, but I guess only when building shared on Windows.
In my test to see if I could work around it I just added the define to FindImath.cmake and then it builds correctly.
More info in this Imath ticket AcademySoftwareFoundation/Imath#212 (comment)
The text was updated successfully, but these errors were encountered:
FYI, recent Imath ships with its own CMake config files which should already take care of adding the IMATH_DLL compile definition to the imported Imath::Imath target. E.g. on MinGW I have this in lib/cmake/Imath/ImathTargets.cmake:
Hi!
When building OCIO with shared libs on windows it fails to link correctly with Imath.
I get the following when building with Imath 3.1.10, OpenExr 3.2.1 and OpenColorIO 2.3.2
This seem to be a common issue with Imath and I think the solution is to define IMATH_DLL when needed, but I'm not sure where or with what logic it should be defined, but I guess only when building shared on Windows.
In my test to see if I could work around it I just added the define to FindImath.cmake and then it builds correctly.
More info in this Imath ticket AcademySoftwareFoundation/Imath#212 (comment)
The text was updated successfully, but these errors were encountered: