I want to build \"gcc cross-compiler\" to compile \"c/c++\" applications on \"Linux\" environment but for \"Windows\" target.
I have made this so far:
There are precompiled cross-compilers of MinGW-w64 available. This allows to compile native 32- and 64-bit Windows binaries from Linux, a two minute tutorial is available at http://www.blogcompiler.com/2010/07/11/compile-for-windows-on-linux/
Just in case you don't want to spend a lot of time trying to build it yourself.
That's actually OK: the way things go, you need to
dllcrt2.o
)You have successful performed step 3 above; it fails building libgcc (which is a GCC support library), but that means the C compiler core is functionnal (although it won't be able to link, it can still create valid object files). You can check that by looking at the gcc/xgcc
file in your GCC build directory.
So, you need to go to the next step, not worrying about your current failure.
(To actuall install the partial C compiler, you should run make
with the -k
option, to have it do it best, even in the face of errors. For example, use make -k install
.)
I grepped through the MinGW sources, and found that dllcrt2.o is something built off the mingwrt package. I assume you have to compile and install that, not just copy the headers?