我按照以下指南构建了一个 mingw-w64 工具链,以便在Fedora 26上交叉编译windows64。(我无法使用buildin工具链,如Fedora人员决定激活我想要禁用的某些编译器选项。)
http://pete.akeo.ie/2010/07/compiling-mingw-w64-with-multilib-on.html
我知道这不是最新版本,但所有步骤看起来都合理且与版本无关。
所以现在这是我的问题:当我尝试做最后一次gcc构建" Gcc,传递2" 时,我收到以下错误消息:
<path to build dir>/mingw-w64/build/gcc/./gcc/xgcc -B<path to build dir>/mingw-w64/build/gcc/./gcc/ -L<path to local install dir>/mingw-local/x86_64-w64-mingw32/lib -L<path to local install dir>/mingw-local/mingw/lib -isystem <path to local install dir>/mingw-local/x86_64-w64-mingw32/include -isystem <path to local install dir>/mingw-local/mingw/include -B<path to local install dir>/mingw-local/x86_64-w64-mingw32/bin/ -B<path to local install dir>/mingw-local/x86_64-w64-mingw32/lib/ -isystem <path to local install dir>/mingw-local/x86_64-w64-mingw32/include -isystem <path to local install dir>/mingw-local/x86_64-w64-mingw32/sys-include -g -O2 -m32 -O2 -I../../../../../gcc-7.2.0/libgcc/../winsup/w32api/include -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc -I. -I. -I../../.././gcc -I../../../../../gcc-7.2.0/libgcc -I../../../../../gcc-7.2.0/libgcc/. -I../../../../../gcc-7.2.0/libgcc/../gcc -I../../../../../gcc-7.2.0/libgcc/../include -DHAVE_CC_TLS -DUSE_EMUTLS -o _muldi3.o -MT _muldi3.o -MD -MP -MF _muldi3.dep -DL_muldi3 -c ../../../../../gcc-7.2.0/libgcc/libgcc2.c
In file included from ../../../../../gcc-7.2.0/libgcc/../gcc/tsystem.h:44:0,
from ../../../../../gcc-7.2.0/libgcc/libgcc2.c:27:
<path to build dir>/mingw-w64/build/gcc/gcc/include/stddef.h:1:15: fatal error: stddef.h: No such file or directory
#include_next <stddef.h>
^~~~~~~~~~
compilation terminated.
我使用以下版本号:
Fedora自己的gcc也是版本7.2.1,我无法从gnu.org下载。 (无论如何我提到它,因为我发现提到的一些解决方案可能存在版本冲突。)
我被困在这里,希望任何人都可以提供帮助。