[libav-devel] [PATCH] Use dlltools instead of lib.exe

Le Hong Dang dangle.vn at gmail.com
Wed Jul 6 17:23:04 CEST 2011


Hi,

On 3/18/2011 11:25 PM, Luca Barbato wrote:
> On 03/17/2011 11:15 AM, Martin Storsjö wrote:
>> From: Luca Barbato<lu_zero at gentoo.org>
>>
>> This way building ffmpeg on mingw won't require windows specific tools
>> ---
>> Tested that the output .lib files work with MSVC. (Only tested
>> building on linux but using the binaries in windows.)
>>
>> I had to add -D to the dlltool parameters for the generated file
>> to work properly.
>>
>> Also removed the - as dlltool always should be present.
> I'm about to enqueue this patch and commit it within the day, anybody
> has more comments?
>
> lu
>

Unfortunately, this change makes the built lib can not be used properly 
with MSVC 2008 (SP1).
I really don't know why but the lib can be used to build in debug mode 
without any notice problem,
but strange behaviors happen when we build our project (that uses libav) 
in release mode:
the build is completed successfully but when we run it will complain 
that it can not find 'some random function' from av*.dll
The 'random function' depends on how we order the input libs when 
linking and is often a function from another library,
for example, those exported functions from gdiplus.lib.
I think there should be something wrong with the produced av*.lib files 
that causes MSVC not to link properly.

We use mingw32 to build libav 0.7 on Windows 7 using MSVC 2008 SP1.

I'm lucky to follow this list so and know about this change so I quickly 
revert this change in the configure script and everything works as expected.

I write this email here just in case someone else face the same problem 
in the future.

Regards,
Le Hong Dang



More information about the libav-devel mailing list