我试图使用MinGW在Fedora 26上为64位Windows 交叉编译OpenImageIO.在yum用于检索依赖项的mingw版本之后,我运行了mingw64-cmake后跟make.但是,我收到一个关于stdlib.h找不到的编译错误.
[ 0%] Built target CopyFiles
[ 0%] Building CXX object src/libutil/CMakeFiles/OpenImageIO_Util.dir/argparse.cpp.obj
In file included from .../oiio/src/libutil/argparse.cpp:36:0:
/usr/x86_64-w64-mingw32/sys-root/mingw/include/c++/cstdlib:75:15: fatal error: stdlib.h: No such file or directory
#include_next <stdlib.h>
^~~~~~~~~~
compilation terminated.
Run Code Online (Sandbox Code Playgroud)
我已经确认stdlib.h至少在提供编译器错误的文件所在的位置/usr/include/和/usr/x86_64-w64-mingw32/sys-root/mingw/include/c++/位置找到了该位置.
为什么我仍然收到错误stdlib.h: No such file or directory?
更新:
我做了更多研究并学习了以下内容:The preprocessor directive #include_next behaves like the #include directive, except that it specifically excludes the directory of the including file …