| 15 | | == MinGW == |
| 16 | | |
| 17 | | You basically have two options for a compiler: mingw "mainline" or mingw-w64. Both offer working gcc's for windows. The latter tends to be slightly more up to date than the former, and offers a few more libraries, like DirectShow headers. The instructions here are basically for mingw "mainline", but the two are interchangeable. Basically, you will install one "MinGW" package and one ("MSys" or "Msys2"), MinGW providing gcc and headers, MSys providing shell utilities like make and bash. Also of note is that the Msys2 system includes some packages like "mingw-w64-i686-gcc" (i.e. cross compilers) that might be of some usefulness if you want to go the cross compiling [but still in windows land] route, similar to cross compiling using cygwin. |
| | 15 | == MinGW/MSys == |
| | 16 | |
| | 17 | You basically have two options for a compiler: mingw "mainline" or mingw-w64. Both offer working gcc's for windows. The latter tends to be slightly more up to date than the former, and offers a few more libraries, like DirectShow headers. The instructions here are basically for mingw "mainline", but the two are interchangeable. Basically, you will install one "MinGW" package and one ("MSys" or "Msys2"), MinGW provides gcc and headers, MSys provides shell utilities like make and bash. Also of note is that the Msys2 system appears to include some packages like "mingw-w64-i686-gcc" (i.e. cross compilers) that might be useful if you want to go the cross compiling [but still in windows land] route, similar to cross compiling using cygwin. But on to MinGW: |
| | 18 | |
| | 19 | === MinGW === |
| 49 | | To use mingw-w64, basically install MinGW, as above, but only check the "msys for developers option", then install a mingw-w64 compiler (see http://ingar.satgnu.net/devenv/mingw32/base.html). Here is an example: http://www.helyar.net/2014/compile-ffmpeg-64-bit-on-windows-with-msysmingw-w64/ |
| 50 | | |
| 51 | | Also note that to access dshow devices you have to use the mingw-w64 as the compiler (or cross compiler), as straight MinGW won't have this functionality available. |
| | 47 | === mingw-w64 === |
| | 48 | |
| | 49 | MinGW-w64 (arguably like MinGW but with better header files) can be found at: |
| | 50 | |
| | 51 | http://mingw-w64.sourceforge.net (note this project does not have downloadable compilers by default, you'll probably want the "win-builds" project for that http://win-builds.org/ or the "mingw-builds" project, which provide pre-built compilers, see list of differences here: http://stackoverflow.com/a/20502212/32453). |
| | 52 | |
| | 53 | To use mingw-w64, basically install Msys using the MinGW setup, as above, but only check the "msys for developers option". Then install a mingw-w64 compiler (see http://ingar.satgnu.net/devenv/mingw32/base.html). Here is an example: http://www.helyar.net/2014/compile-ffmpeg-64-bit-on-windows-with-msysmingw-w64 |
| | 54 | |
| | 55 | Then configure your PATH appropriately, for instance mine looks like this: c:\installs\mingw-w64\i686-4.9.2-posix-dwarf-rt_v3-rev0\mingw32\bin;c:\MinGW\msys\1.0\bin... being the beginning of the PATH. In this case, the MINGW_PATH would be C:\installs\mingw-w64\i686-4.9.2-posix-dwarf-rt_v3-rev0\mingw32 |
| | 56 | |
| | 57 | Also note that to access directshow input devices you have to use the mingw-w64 as the compiler (or cross compiler), as straight MinGW headers don't have this functionality apparently. |
| | 58 | |
| | 59 | And to install libraries you'd either use ./configure --prefix=/usr/local or--prefix=/c/installs/mingw-w64/i686-4.9.2-posix-dwarf-rt_v3-rev0/mingw32/i686-w64-mingw32 |
| | 60 | |
| | 61 | The latter if you wanted to install something to your MINGW_PATH itself... |