[Libav-user] Do I need .lib files to link or will .la work on Windows?

Jeremy Gregorio gunvalkyrie at yahoo.com
Mon Jul 23 01:16:56 EEST 2018

Hi all,     So I got ffmpeg compiled with this:

    ./configure --toolchain=msvc   --enable-gpl --extra-ldflags=-LIBPATH:/usr/lib --extra-cflags=-I/usr/include/lame --extra-cflags=-I/usr/local/include/ --extra-cflags=-I/usr/local/include/lame --host-ldflags=-LIBPATH:/user/lib   --extra-ldflags=-LIBPATH:/usr/local/lib --enable-libmp3lame  --enable-libx264
>From within an msys2 shell ran with this:
    msys2_shell.cmd -mingw64 -full-path

I used this to make sure that cl.exe and link.exe were the Microsoft ones 

    export PATH="/c/Program Files (x86)/Microsoft Visual Studio 14.0/VC/BIN/":$PATH

And I made sure I really did run the Microsoft versions.

I was able to get the samples to compile with "make examples" I had to do a few odds and ends to one of them because usleep isn't available in Visual Studio 2015 but other than that it worked like a charm. I can take the exes out of the msys2 environment and they work with the msys2 dlls so I'm pretty sure I compiled everything right. 

I tried taking one of the examples out of the docs/examples folder and compiling it myself with this:
    cl -o transcode_aac_out.exe -I/usr/include/lame -I/usr/local/include/ transcode_aac.c

I get the *.obj file but it failes with linker errors  (a _lot_ of linker errors, I don't think it's finding anything).     

I tried this:
 Œcl -o transcode_aac_out.exe -I/usr/include/lame -I/usr/local/include/ -link -LIBPATH:/usr/local/lib/  transcode_aac.c
but I got back 

        bash: $'\302\214cl': command not found

 so then I tried adding to my LIB environment variable before launching MSYS like so:
        set LIB=%LIB%;c:\workspace\windows\msys64\usr\local\lib
and taking the -link and -LIBPATH variables away but that just got me the linker errors again.
Is my cl.exe syntax off or do I really need *.lib files to link with? It seems like I shouldn't but maybe I messed up when I compiled FFMEG... 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20180722/3762d556/attachment.html>

More information about the Libav-user mailing list