[FFmpeg-devel] compile issues under mingw-cross-env
Sat Jul 10 21:25:52 CEST 2010
John Calcote <john.calcote at gmail.com> writes:
> Anyone ever tried compiling ffmpeg under mingw-cross-env
> (http://www.nongnu.org/mingw-cross-env/)? I've been playing with it and
> I've found the following issues with CPPFLAGS in the generated config.mak:
> 1) I had to change -std=c99 to -std=gnu99 because _STRICT_ANSI is
> enabled if -std=c99 is used which means functions like strcasecmp aren't
> available (at least the prototypes aren't).
Wrong. strcasecmp() is part of C99 and on any conforming system is
declared when using those flags.
> 2) I had to remove the definition of _POSIX_C_SOURCE=200112 because
> defining it causes pid_t to not be defined in sched.h.
Wrong again. We do not use sched.h at all. We include sys/wait.h,
which defers to sys/types.h for the pid_t type. The standard requires
that sys/types.h define pid_t with no extra conditions imposed.
> I used the following command line to configure:
> $ configure --enable-postproc --enable-gpl --enable-x11grab
> --enable-pthreads --enable-nonfree --enable-libvorbis
> --target-os=mingw32 --enable-memalign-hack --arch=x86_64
> Note this is a 64-bit windows build (arch=x86_64).
The combination of 64-bit and mingw is likely a recipe for trouble.
Maybe the cross-tools are better than regular mingw, I don't know.
> After making these changes in the generated config.mak file, ffmpeg and
> utilities compiled - not cleanly, mind you, but at least as cleanly as
> it does in normal non-cross builds.
What is that supposed to mean? Condescending remarks like that will
not win our hearts.
> Any comments would be appreciated. Perhaps I'm doing something
> fundamentally wrong in my cross compile?
You seem to be using a non-c99 compilation environment. This is not
particularly well supported.
mans at mansr.com
More information about the ffmpeg-devel