[FFmpeg-devel] [RFC] Split libavformat

Måns Rullgård mans
Fri Nov 23 11:18:39 CET 2007


Luca Abeni wrote:
> Hi Diego,
>
> Luca Abeni wrote:
>> Diego Biurrun wrote:
>>>> +EXTRALIBS := -L$(BUILD_ROOT)/libavutil -lavutil$(BUILDSUF) \
>>>> +             -lavcodec$(BUILDSUF) -L$(BUILD_ROOT)/libavcodec \
>>>> +             -lavformat$(BUILDSUF) -L$(BUILD_ROOT)/libavformat $(EXTRALIBS)
>>> Is all of this really needed?
>>
>> Ops... No, I do not think it is needed... I blindly copied it from
>> somewhere else, without thinking. I'll remove this entry.
>
> Looks like I was wrong.
> Those lines are needed to link libavdevice to libav{util, codec,format}.
> I did not know that a library needs to be linked to other libraries (I
> was under the impression that it is sufficient to link the final executable
> with all the needed libaries)...

In most ELF systems it is sufficient that something has pulled in the libs.
Nevertheless, it it good practise to explicitly link libraries against all
their dependencies.  That way there is no need to link the executable
against libs it doesn't directly require.

> Anyway, it seems that without those EXTRALIBS the linking on windows fails.
> Ok to re-add them?

Not exactly like that.  The -L flags must be before the corresponding -l
flags (yes, the existing makefiles should be fixed).

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-devel mailing list