[FFmpeg-user] ffmpeg.c:4492: undefined reference to `_avdevice_register_all'

Kyle kshawkeye at gmail.com
Thu Sep 8 23:07:13 CEST 2011

On 9/7/2011 2:50 PM, Kyle wrote:
> I'm really trying to get this bug: 
> https://ffmpeg.org/trac/ffmpeg/ticket/282 resolved.
> It seems to not even be linking avdevice.
> I tried running: i686-w64-mingw32-gcc -Llibavdevice -Wl,--as-needed 
> -Wl,--warn-common -Wl,-rpath-link=libavdevice -o ffmpeg_g.exe ffmpeg.o 
> cmdutils.o -lavdevice 2>&1 | grep "_avdevice_register_all"
> just for a basic link, but that even fails with:
> "ffmpeg.c:4492: undefined reference to `_avdevice_register_all'"
> Also: i686-w64-mingw32-nm "./libavdevice/avdevice.dll" | grep 
> "_avdevice_register_all"
> Returns: 6d7814c0 T _avdevice_register_all
> Any ideas?
> I'm using the latest FFmpeg and trying to compile with MinGW-w64, the 
> problem seems to only happen with "--disable-static --enable-shared" 
> and when SDL is found. (Though the bug doesn't seem related to SDL so 
> it's stumping me).
> Any help would be great.

I contacted MinGW-w64 and they told me that __declspec(dllexport), needs 
to be used to export the symbols.

__declspec(dllexport) void avdevice_register_all(void);

and so on.

More information about the ffmpeg-user mailing list