[Ffmpeg-devel] Win32 Compile Problem

Brian Brice bbrice
Wed May 17 21:38:50 CEST 2006

Hi guys.
I've been trying to compile ffmpeg with mp3lame support, and so far it
hasn't worked as planned.  I have lame's headers and libraries installed
in nonstandard directories, and I thought that I'd be able to specify
these locations with ffmpeg's configure script.  Unfortunately for the
Win32 build, the options set with --extra-ldflags are always overwritten.

Here's how I configure:

./configure \
	--enable-mingw32 \
	--disable-static \
	--enable-shared  \
	--enable-memalign-hack \
	--disable-debug \
	--enable-mp3lame \
	--extra-cflags=-I$LAME/include \
	--extra-ldflags=-L$LAME/lib \
	--prefix=$PREFIX \

And where the compilation error starts:
[build output]
gcc -O3 -Wall -Wno-switch  -I/home/bbrice/lame-build/include
-Wdeclaration-after-statement -DHAVE_AV_CONFIG_H -DBUILD_AVUTIL -I..
gcc -shared -Wl,-soname,avutil-nt.dll.49
-Wl,--output-def,avutil-nt.def,--out-implib,libavutil.dll.a -o
avutil.dll mathematics.o rational.o intfloat_readwrite.o crc.o -lm
-lmp3lame -lz
cannot find -lmp3lame
collect2: ld returned 1 exit status
make[1]: *** [avutil-nt.dll] Error 1
make[1]: Leaving directory `/home/bbrice/ffmpeg-20060508/libavutil'
make: *** [lib] Error 2

Here's a possible patch to fix it(?):
--- common.mak.orig	2006-04-26 22:30:50.000000000 -0500
+++ common.mak	2006-05-17 14:33:28.078125000 -0500
@@ -7,7 +7,7 @@

  #FIXME: This should be in configure/config.mak
  ifeq ($(CONFIG_WIN32),yes)

  ifeq ($(TARGET_GPROF),yes)

--- libavutil/Makefile.orig	2006-04-23 05:28:54.000000000 -0500
+++ libavutil/Makefile	2006-05-17 14:36:40.890625000 -0500
@@ -6,11 +6,6 @@
  # NOTE: -I.. is needed to include config.h

-#FIXME: This should be in configure/config.mak
-ifeq ($(CONFIG_WIN32),yes)
  OBJS= mathematics.o \
        rational.o \
        intfloat_readwrite.o \

Brian Brice
In order to know recursion, you must first know recursion...

More information about the ffmpeg-devel mailing list