You are not logged in.

#1 2008-09-21 21:24:22

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,549

How to use MinGW?

I'm trying to cross-compile Windows binaries on Arch x86_64. I've used MinGW to compile on Windows before, and I've compiled on straight Linux before, but never cross. I installed mingw32 from the repos, but I'm unsure how to ./configure to use the MinGW includes, etc.

Thanks for any help!

Offline

#2 2008-09-22 09:50:47

wuischke
Member
From: Suisse Romande
Registered: 2007-01-06
Posts: 630

Re: How to use MinGW?

"./configure --host=i486-mingw32" should do the job. Adjust the name if Arch uses "i686-mingw32", it's been a while since I last cross-compiled.

Last edited by wuischke (2008-09-22 09:51:05)

Offline

#3 2008-09-22 15:12:37

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,549

Re: How to use MinGW?

Yeah, I had done that sad It says it's now building for X86 MINGW, but fails and says it can't find windows.h.

windows.h is in /usr/i486-mingw32/include, if I recall (not on main PC right now).

I've tried everything - setting --target (doesn't recognize any option), using includedirs, adding those folders to my PATH, nothing sad

I tried compiling a simple hello world C app with MinGW-GCC (didn't use a makefile or anything, just a one-line compile) and ran it in Wine, it works fine. Perhaps I should make a test app that includes windows.h?

Thanks, though!

Offline

#4 2008-09-22 15:34:24

wuischke
Member
From: Suisse Romande
Registered: 2007-01-06
Posts: 630

Re: How to use MinGW?

What application are you trying to compile? I just installed the cross-compiler and compiled wxwidgets and had no such problems.

Maybe the application has some problems with the configure script, we had a couple of cross-compiling fixes applied to aMule.

Offline

#5 2008-09-22 18:13:35

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,549

Re: How to use MinGW?

x264. I've been compiling it for a while on Windows with MinGW, and I also do it on Linux for Linux. Note that if you have Git >= v1.6 you need to edit version.sh so that commands like git-rev-list are changed to git rev-list, if you are going to try it out.

Thanks =]

Offline

#6 2008-09-22 20:00:46

wuischke
Member
From: Suisse Romande
Registered: 2007-01-06
Posts: 630

Re: How to use MinGW?

You get around the windows.h problem by using a line similar to "CFLAGS="-I/usr/i486-mingw32/include/" ./configure --host=i486-mingw32 --disable-asm", but there are many other errors and it will eventually fail due to undeclared identifiers. One probably has to hack the build process a bit more.

You should also try to compile avisynth and gpac for mingw32 first.

Offline

#7 2008-09-23 18:49:14

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,549

Re: How to use MinGW?

Disabling asm would _kill_ x264 performance tongue A ton of x264 is in handwritten asm.

Thanks very much for your help smile I found someone who's done it before, and he's helping me now.

Offline

#8 2008-09-23 19:44:11

wuischke
Member
From: Suisse Romande
Registered: 2007-01-06
Posts: 630

Re: How to use MinGW?

Please post some results once you are done. You might also want to contact the developers to resolve the cross-compile issues.

Offline

Board footer

Powered by FluxBB