[FFmpeg-trac] #282(build system:open): undefined reference to `_avdevice_register_all'

FFmpeg trac at avcodec.org
Fri Jun 17 01:08:12 CEST 2011


#282: undefined reference to `_avdevice_register_all'
-------------------------------------------------+-------------------------
Reporter:  KSHawkEye                             |       Owner:  michael
    Type:  defect                                |      Status:  open
Priority:  critical                              |   Component:  build
 Version:  git                                   |  system
Keywords:  undefined reference                   |  Resolution:
  avdevice_register_all                          |  Blocked By:
Blocking:                                        |  Reproduced:  0
Analyzed:  0                                     |
-------------------------------------------------+-------------------------

Comment (by KSHawkEye):

 The problem is SDL/ffplay related. I narrowed it down and the issue only
 occurs when ffplay is built, along with --disable-static --enable-shared.

 also, the command you gave me "make ffmpeg" is not valid, I'm not sure if
 it's a windows thing or what, but I think you might have meant "make
 ffmpeg.o" but I'm not going to assume anything.

 Here is "make V=1":


 {{{
 i686-w64-mingw32-gcc -Llibavcodec -Llibavdevice -Llibavfilter
 -Llibavformat -Llibavutil -Llibpostproc -Llibswscale
 -L/home/kyle/software/ffmpeg/packages/sdl/sdl-1.2.14-win32/lib -Wl,--as-
 needed -Wl,--warn-common -Wl,-rpath-link,libpostproc -Wl,-rpath-
 link,libswscale -Wl,-rpath-link,libavfilter -Wl,-rpath-link,libavdevice
 -Wl,-rpath-link,libavformat -Wl,-rpath-link,libavcodec -Wl,-rpath-
 link,libavutil -o ffmpeg_g.exe ffmpeg.o cmdutils.o -lavdevice -lavfilter
 -lavformat -lavcodec -lpostproc -lswscale -lavutil -lavicap32 -lpsapi
 -lole32 -lstrmiids -luuid -lws2_32
 -L/home/kyle/software/ffmpeg/packages/sdl/sdl-1.2.14-win32/lib -lmingw32
 -lSDLmain -lSDL -lm -luser32 -lgdi32 -lwinmm -ldxguid -lm -lpthreadGC2
 -lpsapi
 ffmpeg.o: In function `main':
 /home/kyle/software/ffmpeg/source/ffmpeg-git/ffmpeg.c:4525: undefined
 reference to `_avdevice_register_all'
 cmdutils.o: In function `print_all_libs_info':
 /home/kyle/software/ffmpeg/source/ffmpeg-git/cmdutils.c:514: undefined
 reference to `_avdevice_configuration'
 /home/kyle/software/ffmpeg/source/ffmpeg-git/cmdutils.c:514: undefined
 reference to `_avdevice_version'
 collect2: ld returned 1 exit status
 make: *** [ffmpeg_g.exe] Error 1
 }}}

 As I said, it only happens with --disable-static --enable-shared and it's
 ffplay/sdl related I believe.

-- 
Ticket URL: <https://avcodec.org/trac/ffmpeg/ticket/282#comment:2>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list