[FFmpeg-devel] Cross-compiling for windows?

Ramiro Ribeiro Polla ramiro
Fri Nov 23 15:22:13 CET 2007

Luca Abeni wrote:
> Hi all,
> I am trying to check if my libavnet patch breaks windows builds, but it seems
> to me that there are problems even cross-compiling an unpatched ffmpeg...
> I configure r10927 with:
> ./configure --prefix=/tmp/FW --cross-compile --cross-prefix=i586-mingw32msvc- --enable-memalign-hack --target-os=mingw32
> and I am getting
> [...]
> i586-mingw32msvc-gcc -L"/tmp/T/ffmpeg"/libavformat -L"/tmp/T/ffmpeg"/libavcodec -L"/tmp/T/ffmpeg"/libavutil -Wl,--warn-common -Wl,-rpath-link,"/tmp/T/ffmpeg"/libavcodec 
> -Wl,-rpath-link,"/tmp/T/ffmpeg"/libavformat -Wl,-rpath-link,"/tmp/T/ffmpeg"/libavutil -g -o ffmpeg_g.exe ffmpeg.o cmdutils.o -lavformat -lavcodec -lavutil -lm -lws2_32
> /tmp/T/ffmpeg/libavformat/libavformat.a(utils.o): In function `av_gettime':/tmp/T/ffmpeg/libavformat/utils.c:2613: undefined reference to `_gettimeofday'
> collect2: ld returned 1 exit status
> make: *** [ffmpeg_g.exe] Error 1
> Looks like mingw is missing gettimeofday()? How can I cross-compile for windows?

You need a newer version of mingw-runtime. Look at r9705.

More information about the ffmpeg-devel mailing list