I was unable to get the MinGW runtime to cross-compile
on my Linux system. The problem was the INCLUDES
variables in the various makefiles. The makefiles all
have this definition (or a similar one) for INCLUDES:
INCLUDES = -I$(srcdir)/include
-I$(srcdir)/../w32api/include \ -I$(srcdir)/../include \ -nostdinc -nostdinc++ \ -iwithprefixbefore include
This definition assumes that the w32api includes are
all in a directory called ../w32api. I did not have
w32api here so it didn't work. It seems that it should
instead let gcc find these files in the default system
include directories. (For my cross environment, those
defaults are in /usr/i386-mingw32/include) Those files
that are included in mingw can override those in the
system directories by using -I directives.
I solved the problem for my purposes by changing the
include to the following:
INCLUDES = -I. -Iinclude
This points to the include directory inside the mingw
tree and lets gcc find the rest in standard locations.
I'm not certain that this solution will work for
everyone but it did solve my problems and I've included
Another possibility would be to add a --with-win32api
argument to the configure script for pointing to a
w32api tree in a nonstandard location.
Log in to post a comment.