In your output directory, you have some *.def
files. You can use these files to get your *.lib
files. The syntax is:
lib /def:avcodec-54.def /out:avcodec-54.lib
Use the lib.exe
of your VS version. Mine is located in C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin
. Check the command line options (it way be useful to add /machine:i386
).
Another way to do this: instead of using windows's cmd
directly to start msys/mingw, first start VS command prompt (you can start it from Start menu). It will set some environment variables. From here, compile FFmpeg with msys/mingw: FFmpeg build will autodetect that VS is present, thus will auto-perform the lib
call.
Edit: Sorry, I skipped the "static" part of the question. Here are some tips for a static build (note that I've never build a static FFmpeg used inside visual studio, so maybe it will not work).
First, of course, FFmpeg must be built with the static options: just to be sure, I use these options, so I have no .def of shared files:
./configure --enable-static --disable-shared [other options]
In order to have statically files, you may directly use the .a files (again: I never thried this). Check this question.
If it does not work, you can try the visual studio toochain instead of gcc. But be careful: last time I tried this (but a shared dll), FFmpeg decoding was slower when build from msvc than gcc's output. Check this page for detailed build instructions.