Compiling HandBrake with MinGW.

Archive of historical development discussions
Discussions / Development has moved to GitHub
Forum rules
*******************************
Please be aware we are now using GitHub for issue tracking and feature requests.
- This section of the forum is now closed to new topics.

*******************************
Post Reply
saintdev
Enlightened
Posts: 146
Joined: Wed Dec 20, 2006 4:17 am

Compiling HandBrake with MinGW.

Post by saintdev »

This was a little test I did to see if I could get HandBrake to compile natively under the MinGW compiler and libraries. After messing around with quite a bit I've got it to work.
Please note, the point of this exercise was to get to get HandBrake to compile only, I assumed some things would be (and as it turns out, most are) broken when you run the resultant executable.

I'm posting the patch here, so anyone could mess around with it if they would like.

http://saintdevelopment.com/files/HandB ... .patch.bz2

A second note, this patch was designed to be used with a MinGW cross-compiler under Linux. It may/may not work with MSYS/Cygwin. I haven't, nor do I plan, to test it under those. Our WinGUI developer has expressed his interest, so I assume we will at least have results posted soon if it works or not.

Have fun!
rhester
Veteran User
Posts: 2888
Joined: Tue Apr 18, 2006 10:24 pm

Post by rhester »

Out of curiousity, what didn't work at runtime?

This is a big deal, actually, because of all the problems people have had with cygwin1.dll and the mysterious crashes we've seen.

Rodney
User avatar
s55
HandBrake Team
Posts: 10360
Joined: Sun Dec 24, 2006 1:05 pm

Post by s55 »

Test results with saintdev's exe

- H.264 with AAC = Works
- H.264 with MP3 AC3 or OGM = Video and No Audio
- Xvid Video (No MP3 AC3 or OGM, only AAC)
- ffmpeg intermittently crashes. (No MP3 AC3 or OGM, only AAC)

CSS support compiles although doesn't work.
Less CPU optimisations enabled meaning encode was a good deal slower although improved slightly in his lastest exe where some optimisations were present.


So far no luck with getting it build under cygwin or mingw/msys

cygwin is missing mingw headers and is producing a configure error for everything. Something to do with the C compiler not being able to make executables.
saintdev
Enlightened
Posts: 146
Joined: Wed Dec 20, 2006 4:17 am

Post by saintdev »

sr55 wrote:So far no luck with getting it build under cygwin or mingw/msys

cygwin is missing mingw headers and is producing a configure error for everything. Something to do with the C compiler not being able to make executables.
If you could post one of the configure.log from the failed configure, I'll see what's going on. My guess is it's looking for mingw32-gcc and it's not there, on Cygwin, at least. Should be installed by MinGW by default. Also, check http://www.mingw.org/MinGWiki/index.php/FAQ under " How do I use MinGW with Cygwin?"
You could try reverting the changes to the CC, C++, AR, etc. variables in HandBrake's configure script and see if that works.
Post Reply