[FFmpeg-devel] [Patch] fix mingw/faac linking

Ramiro Polla ramiro.polla
Fri Sep 26 13:25:30 CEST 2008


On Fri, Sep 26, 2008 at 10:23 AM, Andrew Voznytsa
<andrew.voznytsa at gmail.com> wrote:
>> -----Original Message-----
>> From: ffmpeg-devel-bounces at mplayerhq.hu [mailto:ffmpeg-devel-
>> bounces at mplayerhq.hu] On Behalf Of Ramiro Polla
>> Sent: Friday, September 26, 2008 12:23 AM
>> To: FFmpeg development discussions and patches
>> Subject: Re: [FFmpeg-devel] [Patch] fix mingw/faac linking
>> On Thu, Sep 25, 2008 at 5:31 PM, Ramiro Polla <ramiro.polla at gmail.com>
>> wrote:
>> > On Thu, Sep 25, 2008 at 4:30 PM, Andrew Voznytsa
>> > <andrew.voznytsa at gmail.com> wrote:
>> >> On Thu, Sep 25, 2008 at 9:38 PM, M?ns Rullg?rd <mans at mansr.com>
>> wrote:
>> [...]
>> > Besides, I never got any problem with libfaac failing to link. What
>> > version are you using? Is it compiled with mingw as well?
>> Hmm... Apparently it was never trivial to install libfaac on MinGW.
>> The FFmpeg Windows Help website [0] was down for some time last month,
>> but now it's up again, and thanks to 45tripp the wiki is also back up.
>> These are the steps I wrote some (long) time ago:
>> tar zxfv faac-1.26.tar.gz
>> patch -p0 < faac-1.26.patch
>> cd faac
>> sh bootstrap
>> ./configure --prefix=/mingw --enable-static --disable-shared make
>> LDFLAGS="-no-undefined"
>> make install
>> You need MSYS DTK for that (and possibly you have to update autotools
>> as well) because you must re-run bootstrap after patching. The patch is
>> attached here in case the website goes down again at some later point
>> in time.
> Your patch disables some faac pieces unrelated to libfaac.[a,so] so it does
> not resolve stdcall/cdecl problem.

You're right. -std=c99 doesn't define WIN32. FFmpeg is built with that
flag, and libfaac isn't.

You can check the differences with:
echo | gcc -E -xc -dM - > plain
echo | gcc -std=c99 -E -xc -dM - > stdc99
diff -u plain stdc99

So, while building libfaac, just call make as:

make LDFLAGS="-no-undefined" CFLAGS="-O2 -std=c99"

There's no need to patch anyone.

Ramiro Polla

More information about the ffmpeg-devel mailing list