I am trying to cross-compile OpenImageIO for 64-bit Windows on Fedora 26 using MinGW. After using yum
to retrieve the mingw versions of the dependencies, I ran
I solved it, i can compile again.
The solution (for me) is add to path the variable CPLUS_INCLUDE_PATH
and set it to the MinGW c++ include directory, for me: C:\MinGW\lib\gcc\mingw32\6.3.0\include\c++
.
I hope it works for you too.
The use of #include_next
appears to cause lots of issues based on my Googling. Try directly including stdlib.h
using the following syntax:
-isystem /usr/x86_64-w64-ming32/sys-root/mingw/include/c++
This syntax was added in gcc
6.0 to solve issues with third-party libraries. See here for the approach and reasoning.
Edit: Changed answer to reflect new information about gcc wrapper_headers and #include_next