Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove unnecessary headers from strutil.cpp causing build trouble (Ac…
…ademySoftwareFoundation#3976) While testing out the 2.5 beta for use in Blender, I hit an odd build error[1] apparently related to include order. Apparently `windows.h` should be included before `shellapi.h`[2]. Swapping the order does fix things, however, it turns out neither is used in this particular file so just remove them both. Unsure why we didn't see it until now. [1] ``` 20>[9/146] Building CXX object src\libutil\CMakeFiles\OpenImageIO_Util.dir\strutil.cpp.obj 20>FAILED: src/libutil/CMakeFiles/OpenImageIO_Util.dir/strutil.cpp.obj 20>cl : Command line warning D9002: ignoring unknown option '/arch:sse2' 20>C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\shellapi.h(68): error C2146: syntax error: missing ';' before identifier 'DECLSPEC_IMPORT' 20>C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\shellapi.h(79): error C2065: 'HDROP': undeclared identifier 20>C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\shellapi.h(82): error C2086: 'int EXTERN_C': redefinition 20>C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\shellapi.h(68): note: see declaration of 'EXTERN_C' ``` [2] https://stackoverflow.com/questions/2953704/vs2010-lots-of-errors-when-including-standard-libraries https://social.msdn.microsoft.com/forums/vstudio/en-us/ed93ae48-969a-4280-8fd5-ef57a332022b/problems-with-shellexecute-and-shellapih?forum=vcgeneral ## Checklist: <!-- Put an 'x' in the boxes as you complete the checklist items --> - [X] I have read the [contribution guidelines](https://github.com/OpenImageIO/oiio/blob/master/CONTRIBUTING.md). - [ ] I have updated the documentation, if applicable. - [ ] I have ensured that the change is tested somewhere in the testsuite (adding new test cases if necessary). - [ ] If I added or modified a C++ API call, I have also amended the corresponding Python bindings (and if altering ImageBufAlgo functions, also exposed the new functionality as oiiotool options). - [X] My code follows the prevailing code style of this project. If I haven't already run clang-format before submitting, I definitely will look at the CI test that runs clang-format and fix anything that it highlights as being nonconforming. Signed-off-by: Jesse Yurkovich <[email protected]>
- Loading branch information