| 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 more library compatibility, like DirectShow headers, so preferably use mingw-w64. The instructions here are basically for mingw "mainline", but the two are interchangeable. Basically, you will install one "MinGW" package (MinGW or mingw-w64) 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. |
| | 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 more library compatibility, like DirectShow headers, so preferably use mingw-w64. The instructions here are basically for mingw "mainline", but the two are interchangeable. Basically, you will install one "MinGW" package (MinGW or mingw-w64) and one ("MSys" or "Msys2"), MinGW provides gcc and headers and change, 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. |
| | 18 | |
| | 19 | === mingw-w64 === |
| | 20 | |
| | 21 | MinGW-w64 (arguably like MinGW but with better header files) can be found at: |
| | 22 | |
| | 23 | http://mingw-w64.sourceforge.net (note this project does not have downloadable compilers by default, you'll probably want the "mingw-builds" project, which provide pre-built compilers, see list of options here: http://stackoverflow.com/a/20502212/32453 and here http://mingw-w64.org/doku.php/download). |
| | 24 | |
| | 25 | 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 |
| | 26 | |
| | 27 | 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 |
| | 28 | |
| | 29 | 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. |
| | 30 | |
| | 31 | 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 |
| | 32 | |
| | 33 | The latter if you wanted to install something to your MINGW_PATH itself... |
| | 34 | |
| 56 | | === mingw-w64 === |
| 57 | | |
| 58 | | MinGW-w64 (arguably like MinGW but with better header files) can be found at: |
| 59 | | |
| 60 | | http://mingw-w64.sourceforge.net (note this project does not have downloadable compilers by default, you'll probably want the "mingw-builds" project, which provide pre-built compilers, see list of options here: http://stackoverflow.com/a/20502212/32453 and here http://mingw-w64.org/doku.php/download). |
| 61 | | |
| 62 | | 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 |
| 63 | | |
| 64 | | 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 |
| 65 | | |
| 66 | | 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. |
| 67 | | |
| 68 | | 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 |
| 69 | | |
| 70 | | The latter if you wanted to install something to your MINGW_PATH itself... |
| 71 | | |
| 72 | | Alternatively, you can install the MSYS2 system: |
| | 73 | === MSYS2 === |
| | 74 | |
| | 75 | Alternatively, you can install GCC along with the MSYS2 system: |