This is a guide of cross compile libavcodec into mingw32 bit to run on win64 system from linux debian6 64bit version:
- git clone the libavcodec: git clone git://git.libav.org/libav.git
- apt-get install gcc-mingw32
- ./configure –enable-cross-compile –enable-w32threads –cross-prefix=amd64-mingw32msvc- –arch=x86_32 –target-os=mingw32 –enable-memalign-hack –enable-shared
This is actually a mistake because I want to get x86 code, it turns out amd64-mingw32msvc on debian6 x64 is generate x64 code, it’s pretty confusing here. So keep it simple, if you want to have x86 bits, do this steps:
- install mingw32 on win32 OS
- git clone the latest libavcodec: git clone git://git.libav.org/libav.git
- go the source directory:
./configure --enable-w32threads --enable-memalign-hack --enable-shared - make
Have fun.