Zebedia:

Something is very wrong if the mingw headers for your cross compiler
are installed directly in /usr/local/include on your Linux machine.
Since those headers don't apply to software compiled for your Linux
machine, they should be in a directory named something like
i386-w64-mingw32.

Now look at the error you posted.  I'm not sure what program you were
trying to configure, but clearly it is wrong to try to use "gcc"
(which would be your Linux machine's native GCC, used to build Linux
programs) with the MinGW headers (which are meant for native Windows
software).  That's why _mingw.h is complaining: you're trying to use
it with the wrong compiler.

If you're interested in cross-compiling from Linux to Windows, you
might want to look at my Nixcrpkgs project, since I've already figured
out a lot of the basic issues and you can reproduce my results
reliably by just running a few commands:

https://github.com/DavidEGrayson/nixcrpkgs

--David Grayson

On Wed, Aug 23, 2017 at 1:59 PM, Zebediah Figura <[email protected]> wrote:
> Hello,
>
> I am interested in implementing, or helping to implement, support for 16-bit
> code and NE executables in mingw.
>
> I am trying to build the gcc cross-compiler (i386-w64-mingw32-gcc) in
> accordance with the instructions at
> https://sourceforge.net/p/mingw-w64/wiki2/Cross%20Win32%20and%20Win64%20compiler/
> but I run into an error configuring gcc:
>
> configure:5564: checking for the correct version of gmp.h
> configure:5584: gcc -c -g -O2   conftest.c >&5
> In file included from /usr/local/include/crtdefs.h:10:0,
>                  from /usr/local/include/limits.h:6,
>                  from /usr/include/gmp.h:56,
>                  from conftest.c:10:
> /usr/local/include/_mingw.h:264:2: error: #error Only Win32 target is
> supported!
>
> I built binutils and the headers for multilib, so I do not understand why I
> am encountering this error. Can anyone help with this problem?
>
> Thanks,
> Zeb
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Mingw-w64-public mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to