[FFmpeg-trac] #7396(undetermined:new): libavcodec: uses dynamic libx264 by default

FFmpeg trac at avcodec.org
Mon Sep 3 18:09:51 EEST 2018


#7396: libavcodec: uses dynamic libx264 by default
-------------------------------------+-------------------------------------
             Reporter:  maarten      |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:
  undetermined                       |  unspecified
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Summary of the bug:
 Linking ffmpeg to static libx264 causes LNK4049 warnings (on Windows,
 Visual Studio)

 On Windows Visual Studio, when linking a static ffmpeg build to static
 dependencies, libavcodec assumes that libx264 is dynamic.

 How to reproduce:
 Build a static libx264 library.
 Build a dynamic ffmpeg library, with libx264 support.

 OR

 Build static libx264, build static ffmpeg library, link an application to
 both static libraries.

 Following warnings are produces:
 {{{
 libavcodec.lib(libx264.o) : warning LNK4049: locally defined symbol
 x264_levels imported [C:\issues\conan_ffmpeg_1\build\issue.vcxproj]
 libavcodec.lib(libx264.o) : warning LNK4049: locally defined symbol
 x264_bit_depth imported [C:\issues\conan_ffmpeg_1\build\issue.vcxproj]
 }}}

 I believe the following lines in libavcodec/libx264.c are to blame and
 should be removed.
 {{{
 #if defined(_MSC_VER)
 #define X264_API_IMPORTS 1
 #endif
 }}}

--
Ticket URL: <https://trac.ffmpeg.org/ticket/7396>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list