[Libav-user] Windows compile can't find LAME

Jeremy Gregorio gunvalkyrie at yahoo.com
Wed Jul 11 06:53:11 EEST 2018


 Thanks. The --arch=i386 was me trying to get 32-bit libraries so I could build a 32-bit app on my 64-bit Windows. I didn't want to leave users stuck on 32-bit Win7 in a lurch. 

There is a config log. 


I tried moving the LAME header file to /usr/local/include/lame/lame.h and running this:
 $ ./configure --toolchain=msvc --enable-libx264 --enable-libmp3lame --enable-gpl --extra-ldflags=-L/usr/lib --extra-cflags=-I/usr/include/lame --extra-cflags=-I/usr/local/include/ --extra-cflags=-I/usr/local/include/lame --host-ldflags=-L/user/lib   --extra-ldflags=-L/usr/local/lib

That seems to have gotten me a little further, but I can't seem to get the linker to find my libmp3lame.lib file. I think I'm using the --extra-ldflags wrong but I don't know how to fix it... 


require libmp3lame >= 3.98.3 lame/lame.h lame_set_VBR_quality -lmp3lame
check_lib libmp3lame lame/lame.h lame_set_VBR_quality -lmp3lame
check_func_headers lame/lame.h lame_set_VBR_quality -lmp3lame
test_ld cc -lmp3lame
test_cc
BEGIN ./ffconf.xTrLDuO7/test.c
    1    #include <lame/lame.h>
    2    #include <stdint.h>
    3    long check_lame_set_VBR_quality(void) { return (long) lame_set_VBR_quality; }
    4    int main(void) { int ret = 0;
    5     ret |= ((intptr_t)check_lame_set_VBR_quality) & 0xFFFF;
    6    return ret; }
END ./ffconf.xTrLDuO7/test.c
cl -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_WIN32_WINNT=0x0600 -nologo -I/usr/include/lame -I/usr/local/include/ -I/usr/local/include/lame -c -Fo./ffconf.xTrLDuO7/test.o ./ffconf.xTrLDuO7/test.c
test.c
./compat/windows/mslink -L/usr/lib -L/usr/local/lib -nologo -LARGEADDRESSAWARE -out:./ffconf.xTrLDuO7/test.exe ./ffconf.xTrLDuO7/test.o mp3lame.lib
Microsoft (R) Incremental Linker Version 14.00.24215.1
Copyright (C) Microsoft Corporation.  All rights reserved.

LINK : warning LNK4044: unrecognized option '/LC:/workspace/windows/msys64/usr/lib'; ignored
LINK : warning LNK4044: unrecognized option '/LC:/workspace/windows/msys64/usr/local/lib'; ignored
LINK : fatal error LNK1181: cannot open input file 'mp3lame.lib'
ERROR: libmp3lame >= 3.98.3 not found






    On Tuesday, July 10, 2018, 5:25:03 AM PDT, Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:  
 
 2018-07-08 18:46 GMT+02:00, Jeremy Gregorio
<gunvalkyrie-at-yahoo.com at ffmpeg.org>:
>  ./configure --toolchain=msvc --arch=i386 --enable-yasm --enable-asm
> --enable-static --disable-shared --enable-libx264 --enable-libmp3lame
> --enable-gpl --extra-ldflags=-L/usr/lib --extra-cflags=-I/usr/include/lame
> --host-ldflags=-L/user/lib  --extra-libs=-lm --extra-libs=-lpthreads

Unrelated:
The following options are useless because they are the default and
make debugging the configure line more difficult:
--enable-yasm --enable-asm --enable-static --disable-shared

If the following is unneeded (as I expect), it is dangerous to use it
(most people do not understand what the option does):
--arch=i386

I know that there is a (horrible) regression that makes -lm and -lpthreads
sometimes necessary, it would still be great if you could report why it is
needed in your case.

> But it complains it can't find lame:
>    ERROR: libmp3lame >= 3.98.3 not found

(Not unrelated:)
Was this the only line printed by configure when it failed
or was there anything else?

Carl Eugen
_______________________________________________
Libav-user mailing list
Libav-user at ffmpeg.org
http://ffmpeg.org/mailman/listinfo/libav-user
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20180711/b20ae661/attachment.html>


More information about the Libav-user mailing list