[FFmpeg-devel] Do not define API_IMPORTS for libx264 and libx265
When building ffmpeg on Visual Studio, libavcodec/libx264.c and libavcodec/libx265.c assume that ffmpeg is linked to a dynamic libx264 and libx265 library. Instead, this information is delivered by pkg-config. Linking ffmpeg to a static libx264 causes LNK4049 warnings to be emitted. Because warnings can obscure bugs, I propose to remove these lines and let pkg-config handle this. Best regards (First patch using git send-mail) ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 1/2] libavcodec/libx264: do not define X264_API_IMPORTS
From: Anonymous Maarten These defines should be passed by pkg-config. --- libavcodec/libx264.c | 4 1 file changed, 4 deletions(-) diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index 54e6703d73..b6f4c102c4 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -29,10 +29,6 @@ #include "avcodec.h" #include "internal.h" -#if defined(_MSC_VER) -#define X264_API_IMPORTS 1 -#endif - #include #include #include -- 2.17.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 2/2] libavcodec/libx265: do not define X265_API_IMPORTS
From: Anonymous Maarten The defines should be passed by pkg-config. Signed-off-by: Anonymous Maarten --- libavcodec/libx265.c | 4 1 file changed, 4 deletions(-) diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c index 27c90b323f..f794205198 100644 --- a/libavcodec/libx265.c +++ b/libavcodec/libx265.c @@ -20,10 +20,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#if defined(_MSC_VER) -#define X265_API_IMPORTS 1 -#endif - #include #include -- 2.17.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] Create .lib static libraries on Windows instead of .a libraries (using MSVC compiler)
The current situation is inconsistent. It creates .lib/.dlls files for dynamic libraries and .a files for static libraries. This complicates e.g. detecting ffmpeg using cmake needlessly. Changing this behavior would be a net gain. I would also be happy if there would be a (configure) switch to manually set the pre/suffix. Maarten On 27 September 2017 at 22:26, Hendrik Leppkes wrote: > On Wed, Sep 27, 2017 at 10:11 PM, Mateusz wrote: >> W dniu 2017-09-27 o 17:40, Hendrik Leppkes pisze: >>> On Wed, Sep 27, 2017 at 4:43 PM, Anonymous Maarten >>> wrote: >>>> Hey, >>>> >>>> Building the static ffmpeg library using vcpkg is currently broken [1][2]. >>>> This is mainly due to the fact that the built static libraries are .a files >>>> with lib prefixes. >>>> >>>> The attached patch sets the lib prefix to "" and the lib suffix to ".lib". >>>> >>>> Tested by building ffmpeg using vcpkg and Visual Studio 2017 Community >>>> Edition on Windows 10. >>>> The resulted libraries link correctly to my application. >>>> >>> This would break the workflow for everyone that is currently working >>> with the current names, however. >> >> For gcc it breaks nothing (it still makes lib...a files), for msvc it is >> improvement. >> Is there any person happy with lib...a names for lib in msvc? >> > > It doesn't really matter if you're happy with it or not, if you change > it stuff will still break. > > - Hendrik > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] Create .lib static libraries on Windows instead of .a libraries (using MSVC compiler)
>>* Hey, *>>>>* Building the static ffmpeg library using vcpkg is currently broken [1][2]. *>>* This is mainly due to the fact that the built static libraries are .a files *>>* with lib prefixes. *>>>>* The attached patch sets the lib prefix to "" and the lib suffix to ".lib". *>>>>* Tested by building ffmpeg using vcpkg and Visual Studio 2017 Community *>>* Edition on Windows 10. *>>* The resu*lted libraries link correctly to my application. >> > Carl Eugen Hoyos: > Did this work with older versions of any of the involved tools (including FFmpeg)? 3.3.3 is the first version I have tried to build using vcpkg. [1] I guess 'no' is the answer to your question. > Hendrik Leppkes: > This would break the workflow for everyone that is currently working with the > current names, however. I would be equally happy if there would be a way (using configure arguments?) to set these two parameters. [1] https://github.com/Microsoft/vcpkg/blob/084b1afe9af1690916fab95bbb80c6891109f0fc/ports/ffmpeg/CONTROL Thanks. On 27 September 2017 at 16:43, Anonymous Maarten < anonymous.maar...@gmail.com> wrote: > Hey, > > Building the static ffmpeg library using vcpkg is currently broken [1][2]. > This is mainly due to the fact that the built static libraries are .a > files with lib prefixes. > > The attached patch sets the lib prefix to "" and the lib suffix to ".lib". > > Tested by building ffmpeg using vcpkg and Visual Studio 2017 Community > Edition on Windows 10. > The resulted libraries link correctly to my application. > > [1] https://github.com/Microsoft/vcpkg/blob/084b1afe9af1690916fab95bbb80c6 > 891109f0fc/ports/ffmpeg/portfile.cmake#L1-L4 > [2] https://github.com/Microsoft/vcpkg/issues/1821 > > Maarten, > > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] Create .lib static libraries on Windows instead of .a libraries (using MSVC compiler)
Hey, Building the static ffmpeg library using vcpkg is currently broken [1][2]. This is mainly due to the fact that the built static libraries are .a files with lib prefixes. The attached patch sets the lib prefix to "" and the lib suffix to ".lib". Tested by building ffmpeg using vcpkg and Visual Studio 2017 Community Edition on Windows 10. The resulted libraries link correctly to my application. [1] https://github.com/Microsoft/vcpkg/blob/084b1afe9af1690916fab95bbb80c6891109f0fc/ports/ffmpeg/portfile.cmake#L1-L4 [2] https://github.com/Microsoft/vcpkg/issues/1821 Maarten, 0001-configure-create-.lib-static-libraries-using-MSVC-co.patch Description: Binary data ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel