Sox v14.2.0
Ffmpeg r16537
Speex v1.2rc1
Lame v3.98.2
MinGW v5.1.4 with updated bash, make, and binutils
MSYS v1.0.10
I am trying to build Sox on Window using MingGW with Lame and FFmpeg (including Speex) support.
After successfully building static versions of Lame, Speex and FFmpeg, I am able to configure Sox like so:
./configure --with-ffmpeg --with-lame --disable-shared --enable-static
The build works right up to the link step:
../libtool --silent --tag=CC --silent --mode=link gcc -Wconversion -g -O2 -D_FORTIFY_SOURCE=2 -Wall -W -Wmissing-prototypes -Wstrict-prototypes -pedantic -o sox.exe sox.o libsox.la ../libgsm/libgsm.la ../lpc10/liblpc10.la -lavformat -lavcodec -lavutil -lmp3lame
but it fails on a ton of "undefined reference" errors in libavformat.a and libavcodec.a (see attached file).
I've found that these undefined symbols are defined in libws2_32.a and libspeex.a and can be fixed by using -lws2_32 and -lspeex.
libws2_32.a is an artifact of compiling with MinGW, while libspeex.a is there because I compiled Speex support into FFmpeg. When building on Ubuntu, the configure script seems to detect that FFmpeg is using Speex and will put in the -lspeex automatically.
Sox linker errors
Indeed the Windows build in the "Files" section is still missing ffmpeg support.
As a workaround you can use pipes of course.
Not sure about the status of FFmpeg in recent Windows builds, but the ffmpeg format handler has been deprecated anyway and will be removed from the next release on all platforms.