There used to be a halfway-decent mingw-w64 wiki page about how to build a cross-compiler, but I can't find it.
Perhaps someone has already done the work to create a cross-compiler package for your Linux distribution. This StackOverflow question seems promising: https://unix.stackexchange.com/questions/327156/where-can-i-find-and-install-the-mingw-w64-packages-for-centos-7 I also have a personal project that you could use to build a cross-compiler on any Linux distribution, or you could just look at the build recipes in my project as a reference: https://github.com/DavidEGrayson/nixcrpkgs By the way, you're not going to be able to manually install all the MinGW headers and make sure they have the proper contents just by reading helpful configure script errors. You need an actual guide/recipes that tells you how to install those headers by running the appropriate commands. --David On Mon, Dec 2, 2019 at 4:49 PM Thomas Dineen <[email protected]> wrote: > > Gentle People: > > I am getting the following configure error when I attempt to build > mingw-w64-crt: > Please show me the best or proper instructions for building a mingw > cross compiler on CentOS > with a target of Windows(X86 and i686). I am suffering with google > search overload with too many > opinions! > Full listing shown below: > > Error: > > Checking _mingw_mac.h usability... no > checking _mingw_mac.h presence... no > checking for _mingw_mac.h... no > configure: error: Please check if the mingw-w64 header set and the > build/host option are set properly. > > Full Listing: > > cd /home/tdineen/Mingw_Build_X86_11_2019/mingw-w64-v7.0.0/mingw-w64-crt > > Linux3% ./configure > --prefix=/home/tdineen/Mingw_Build_X86_11_2019/x86_64-w64-mingw32/sysroot > --host=x86_64-w64 mingw32 > -includedir=/home/tdineen/Mingw_Build_X86_11_2019/mingw-w64-v2.0.7/mingw-w64-crt/include > > checking for a BSD-compatible install... /usr/bin/install -c > checking whether build environment is sane... yes > checking for x86_64-w64-mingw32-strip... no > checking for strip... strip > checking for a thread-safe mkdir -p... /bin/mkdir -p > checking for gawk... gawk > checking whether make sets $(MAKE)... yes > checking whether make supports nested variables... yes > checking whether to enable maintainer-specific portions of Makefiles... no > checking build system type... x86_64-pc-linux-gnu > checking host system type... x86_64-w64-mingw32 > checking for sysroot... > /home/tdineen/Mingw_Build_X86_11_2019/x86_64-w64-mingw32/sysroot > checking for a sed that does not truncate output... /bin/sed > checking for gawk... (cached) gawk > checking for x86_64-w64-mingw32-gcc... no > checking for gcc... gcc > checking whether the C compiler works... yes > checking for C compiler default output file name... a.out > checking for suffix of executables... > checking whether we are cross compiling... no > checking for suffix of object files... o > checking whether we are using the GNU C compiler... yes > checking whether gcc accepts -g... yes > checking for gcc option to accept ISO C89... none needed > checking whether gcc understands -c and -o together... yes > checking for style of include used by make... GNU > checking dependency style of gcc... gcc3 > checking for x86_64-w64-mingw32-g++... no > checking for x86_64-w64-mingw32-c++... no > checking for x86_64-w64-mingw32-gpp... no > checking for x86_64-w64-mingw32-aCC... no > checking for x86_64-w64-mingw32-CC... no > checking for x86_64-w64-mingw32-cxx... no > checking for x86_64-w64-mingw32-cc++... no > checking for x86_64-w64-mingw32-cl.exe... no > checking for x86_64-w64-mingw32-FCC... no > checking for x86_64-w64-mingw32-KCC... no > checking for x86_64-w64-mingw32-RCC... no > checking for x86_64-w64-mingw32-xlC_r... no > checking for x86_64-w64-mingw32-xlC... no > checking for g++... g++ > checking whether we are using the GNU C++ compiler... yes > checking whether g++ accepts -g... yes > checking dependency style of g++... gcc3 > checking how to run the C preprocessor... gcc -E > checking for x86_64-w64-mingw32-ranlib... no > checking for ranlib... ranlib > checking for x86_64-w64-mingw32-dlltool... no > checking for dlltool... no > checking for x86_64-w64-mingw32-ar... no > checking for x86_64-w64-mingw32-lib... no > checking for x86_64-w64-mingw32-link... no > checking for ar... ar > checking the archiver (ar) interface... ar > checking dependency style of gcc... gcc3 > checking for x86_64-w64-mingw32-as... no > checking for as... as > checking whether to build a w32api package for Cygwin... no > checking whether to build the Win32 libraries... yes > checking whether to build the Win64 libraries... yes > checking whether to build the WinARM32 libraries... no > checking whether to build the WinARM64 libraries... no > checking whether to use genlib... no > checking whether to enable globbing... no > checking whether to enable private exports... no > checking whether to enable delay import libs... no > checking what to provide as libmsvcrt.a... msvcrt-os > checking whether to enable experimental features... no > checking whether the compiler supports -municode... no > checking whether the linker provides __CTOR_LIST__... no > checking for grep that handles long lines and -e... /bin/grep > checking for egrep... /bin/grep -E > checking for ANSI C header files... yes > checking for sys/types.h... yes > checking for sys/stat.h... yes > checking for stdlib.h... yes > checking for string.h... yes > checking for memory.h... yes > checking for strings.h... yes > checking for inttypes.h... yes > checking for stdint.h... yes > checking for unistd.h... yes > checking _mingw_mac.h usability... no > checking _mingw_mac.h presence... no > checking for _mingw_mac.h... no > configure: error: Please check if the mingw-w64 header set and the > build/host option are set properly. > > > > > _______________________________________________ > Mingw-w64-public mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/mingw-w64-public _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
