[FFmpeg-devel] [RFC FIX] Build error with ffmpeg 3.1.3 (and current git) on cygwin

Tobias Rapp t.rapp at noa-archive.com
Thu Sep 22 14:28:29 EEST 2016


On 22.09.2016 12:30, Michael Fritscher wrote:
> Hi,
>
> I try to build ffmpeg 3.1.3 on cygwin64 on Windows.
>
> Configstring: ./configure --prefix=/usr/local --enable-ffplay
> --enable-ffmpeg --enable-ffserver --enable-gpl --enable-version3
> --enable-nonfree --enable-shared --enable-libfreetype --enable-libgsm
> --enable-libmp3lame --enable-libopencv --enable-libtheora
> --enable-libvorbis --enable-libx264 --enable-libxvid --enable-ffplay
> --enable-outdev=sdl --enable-outdev=xv --enable-indev=dshow
> --enable-pthreads --enable-ffplay --enable-ffmpeg --enable-ffserver
> --enable-demuxer=mpegvideo --enable-parser=mpegvideo
> --enable-muxer=mpjpeg --enable-muxer=mjpeg --enable-demuxer=mjpeg
> --enable-parser=mjpeg
>
> Output:
> CC      cmdutils.o
> cmdutils.c: In Funktion »init_dynload«:
> cmdutils.c:115:5: Fehler: Implizite Deklaration der Funktion
> »SetDllDirectory« [-Werror=implicit-function-declaration]
>       SetDllDirectory("");
>
> My quick fix was to add
>
> #if HAVE_SETDLLDIRECTORY
> #include <windows.h>
> #endif
>
> on line 64. Is this the right way to cope with this? At least it
> compiles, links and works ;-)

I stumbled over a similar issue, it has also been fixed in the 
release/3.1 branch but after n3.1.3 in commit 
12320c08221f0eecf6d9af3a6f12f42e656f0674.

See https://ffmpeg.org/pipermail/ffmpeg-devel/2016-August/198476.html

> In current git I found
> #ifdef _WIN32
> #include <windows.h>
> #endif,
>
> which does not work under cygwin. Apparently _WIN32 is not defined in
> this environment.

But in this case SetDllDirectory() is not called as it's also 
ifdef-depending on _WIN32.

Regards,
Tobias



More information about the ffmpeg-devel mailing list