title: How to link ffmpeg statically using mingw?
body: <p>My application compiles success, but when run it can not find avcodec-57.dll, avdevice-57.dll and other ffmpeg libraries. I need a static app with no dependencies. Here is compiler's log:</p>
  
  <pre><code>cd 'D:\Projects\Test1'
  D:\Programms\MinGW\msys\1.0\bin\make.exe -f Makefile CONF=Release
  "/D/Programms/MinGW/msys/1.0/bin/make.exe" -f nbproject/Makefile-Release.mk QMAKE= SUBPROJECTS= .build-conf
  make.exe[1]: Entering directory `/d/Projects/Test1'
  "/D/Programms/MinGW/msys/1.0/bin/make.exe"  -f nbproject/Makefile-Release.mk dist/Release/MinGW-Windows/test1.exe
  make.exe[2]: Entering directory `/d/Projects/Test1'
  mkdir -p build/Release/MinGW-Windows
  rm -f "build/Release/MinGW-Windows/main.o.d"
  g++ -m32 -static -mwindows   -c -O2 -I/D/Programms/MinGW/ffmpeg/include -std=c++11 -MMD -MP -MF "build/Release/MinGW-Windows/main.o.d" -o build/Release/MinGW-Windows/main.o main.cpp
  mkdir -p dist/Release/MinGW-Windows
  g++ -m32 -static -mwindows    -o dist/Release/MinGW-Windows/test1 build/Release/MinGW-Windows/main.o -L/D/Programms/MinGW/ffmpeg/lib -lavdevice.dll -lavformat.dll -lavutil.dll
  make.exe[2]: Leaving directory `/d/Projects/Test1'
  make.exe[1]: Leaving directory `/d/Projects/Test1'
  
  BUILD SUCCESSFUL (time: 3s)
  </code></pre>
  
  <p>(IDE: NetBeans; Compiler: MinGW)</p>
  
  <p>Maybe I missed something?</p>