[Ffmpeg-devel] [PATCH] Networking with MingW
Michael A. Kohn
mike
Tue Nov 7 01:08:17 CET 2006
On Mon, 6 Nov 2006, V?ctor Paesa wrote:
> Hi,
>>
>> On Mon, 6 Nov 2006, Alex Beregszaszi wrote:
>>
>>> Hi,
>>>
>>>> I also made a quick #define change in gxf.c so MingW can build a
>>>> shared DLL. I was getting errors during linking without this change.
>>>>
>>>> I really hope someone accepts this patch. I'm trying to convince the
>>>> company I work for to move to Linux or at least cross-platform and
>>>> this is the best library (in my opinion) for doing the graphics that
>>>> we would need.
>>>
>>> static AVRational fps_tag2avr(int32_t fps) {
>>> +#ifndef __MINGW32__
>>> extern const AVRational ff_frame_rate_tab[];
>>> +#else
>>> + extern __declspec(dllimport) const AVRational ff_frame_rate_tab[];
>>> +#endif
>>> if (fps < 1 || fps > 9) fps = 9;
>>> return ff_frame_rate_tab[9 - fps]; // values have opposite order
>>> }
>>>
>>> What the hell is that?
>>
>> Good question. The linker gave an error about "auto-import" and reading
>> the man page for ld it said that would fix it. I believe it's forcing
>> that symbol to be exported or imported for some reason, no sure why. Yes
>> it's disgusting, but a lot of Windows programming is.
>>
>
> If I recall correctly, this is a bug in binutils.
> If you use binutils-2.15.91-20040904-1 upgrade or downgrade them.
I was using GNU ld version 2.15.90.0.2... but I suppose the bug could be
in here too.. that code is simple to fix by hand anyway so it's not so
important to me.. I'll remove it from the patch..
More information about the ffmpeg-devel
mailing list