openexr
openexr copied to clipboard
ImfHeader.h:22:10: fatal error: ImathVec.h: No such file or directory
I am trying to update from 2.5.6 to 3.0.4. OpenEXR 3.0.4 builds, but my application no longer does. The error is:
.../include/OpenEXR/ImfHeader.h:22:10: fatal error: ImathVec.h: No such file or directory
22 | #include "ImathVec.h"
| ^~~~~~~~~~~~
The reason is that I don't have <prefix>/include/OpenEXR
and <prefix>/include/Imath
in my include paths, only <prefix>/include
.
Imath provides both <prefix>/include/
and <prefix>/include/Imath
as include directories, so it should be able to see the header
Yes, the fully qualified #include <Project/header.h>
is always preferred in any context, IMHO.
Is this ever going to be fixed? Including without the Imath/ prefix does not work with VS2022 and vcpkg manifest mode. I have to fix up the header files whenever they are refreshed. If there's a better way or a way to include the Imath into the project's include directories I'd love to know. I've tried relative paths etc. but no luck.
Per @lgritz's comment, a PR implementing this change would be welcome.