[vlc-devel] [PATCH 4/4] stream_extractor:archive: use the static linking on Windows

Steve Lhomme robux4 at gmail.com
Thu Jul 20 07:35:38 CEST 2017


On Wed, Jul 19, 2017 at 11:07 AM, Rémi Denis-Courmont <remi at remlab.net> wrote:
> Le 19 juillet 2017 14:46:04 GMT+08:00, Steve Lhomme <robux4 at videolabs.io> a
> écrit :
>>
>> The library is built as static so we need to tell it when compiling too.
>> ---
>>  modules/stream_extractor/archive.c | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/modules/stream_extractor/archive.c
>> b/modules/stream_extractor/archive.c
>> index b2bf4f9d47..29ab9d15e9 100644
>> --- a/modules/stream_extractor/archive.c
>> +++ b/modules/stream_extractor/archive.c
>> @@ -32,6 +32,10 @@
>>  #include <vlc_dialog.h>
>>  #include <vlc_input_item.h>
>>
>> +#ifdef _WIN32
>> +#define LIBARCHIVE_STATIC
>> +#endif
>> +
>>  #include <assert.h>
>>  #include <archive.h>
>>  #include <archive_entry.h>
>
>
> Now thay seems out of place. Why should the code assume that the library is
> built a certain way?

Indeed it's less logical.

The documentation in archive.h clearly says it's up to the caller to
tell if he's using a static or dynamic linking. Which is only
available on Windows and which is not handled when building with
autotools. And in CMake it doesn't fill the pkg-config file
accordingly.

So I guess for now it's best that we do it ourselves and do it like in
patch `contrib:libarchive: force static build`.

> --
> Rémi Denis-Courmont
> Typed on an inconvenient virtual keyboard
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list