Seeking clarification about using OpenEXR headers
Richard Addison-Wood <[email protected]>
| Newsgroups | gmane.comp.video.openexr.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, This has annoyed me at various points in the past, but since it showed up again for me today, I thought I would seek clarification. I have been assuming the the intended way for including OpenEXR headers was using this form: #include <ImfInputFile.h> Certainly, that is how the examples that come with OpenEXR include the headers. However, I do see source code out in the wild that uses this form instead: #include <OpenEXR/ImfInputFile.h> Which form is actually intended to be used? As an illustration, assume that I have a selected version of the headers available like this: /libraries/OpenEXR/N.N.N/include/ImfInputFile.h So I build using -I/libraries/OpenEXR/N.N.N/include with the expectation that that the former #include form is used. However, if the source code uses the latter #include form, the code can end up picking up a different version of the headers such as the version that is provided with the Linux distribution, such as: /usr/include/OpenEXR/ImfInputFile.h There are various ways that I can address this. One is to do make my selected version of the headers available like this: /libraries/OpenEXR/N.N.N/include/OpenEXR/ImfInputFile.h and then build using both -I/libraries/OpenEXR/N.N.N/include/OpenEXR and /libraries/OpenEXR/N.N.N/include to support both forms. There are other approaches as well. I suppose I will continue to need to support both forms since there is source out in the wild the uses both. I guess I am curious about which form should be recommended.