[FFmpeg-trac] #11242(build system:new): Incorrect suffix in `configure` for static builds on Windows causes lib not found

FFmpeg trac at avcodec.org
Mon Oct 14 10:16:17 EEST 2024


#11242: Incorrect suffix in `configure` for static builds on Windows causes lib not
found
-------------------------------------+-------------------------------------
             Reporter:  violet       |                     Type:  defect
               Status:  new          |                 Priority:  critical
            Component:  build        |                  Version:  git-
  system                             |  master
             Keywords:  Build        |               Blocked By:
  system; Win32; Static build;       |
  Suffix                             |
             Blocking:               |  Reproduced by developer:  1
Analyzed by developer:  1            |
-------------------------------------+-------------------------------------
 Summary of the bug:
 How to reproduce:

 In the ffmpeg/configure, static builds on win10 msys2 always have linux-
 style ".a" suffix, e.g. "libavcodec.a", rather than msvc-style ".lib"
 suffix.

 When compiling `libavcodec.a` with other libs, This linux-style suffix
 breaks VS2022's auto processing, and always causes lib-not-found error.

 After digging into ffmpeg/configure, I found this error is just caused by
 `LIBSUF` variable not set correctly for differnet target-os.

 Thus, this issue can be fixed as follows:

 In ffmpeg/configure -> `case $target_os in` -> `win32|win64)`

 The original code looks like:
 {{{
 SLIBPREF=""
 SLIBSUF=".dll"
 }}}

 By simply add one line of code, this issue can be solved:
 {{{
 SLIBPREF=""
 LIBSUF=".lib"  # FIX LIBSUF here
 SLIBSUF=".dll"
 }}}

 Patches should be submitted to the ffmpeg-devel mailing list and not this
 bug tracker.
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/11242>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list