Ya vimos como compilar con Borland C, Ahora veamos como compilar con MinGW, asumiendo que tenemos creada ya la carpeta “C:\HrbDevel”.
1. Descargamos MinGW desde Aquí y lo guardamos por ejemplo en la carpeta C:\Download
En realidad “MinGW-5.1.4.exe” es un gestor de descarga de paquetes necesarios para instalar MinGW.
2. Ejecutamos “MinGW-5.1.4.exe”
– Welcome to MinGW Versión 5.1.4 -> Next
– Download and install or Download only
– I Agree
– Which MinGW previous – current – candidate
– Choose components: Minimal – Full – Custom
– Choose Install location -> c:\MinGW -> Next
– Choose Start Menu folder -> MinGW
– Downloading … se instalará en la carpeta C:\MinGW
3. Ahora tenemos que modificar el script “Bld.bat” y lo guardamos en “C:\HrbDevel” como “Bldm.bat”, tiene que quedar así:
@echo off
SET HB_ARCHITECTURE=win
SET HB_COMPILER=mingw
set PATH=c:\Mingw\bin;c:\windows\system32;C:\MinGW\libexec\gcc\mingw32\3.4.5\;c:\bison\bin;%PATH%
set HB_INSTALL_PREFIX=C:\Harbourm
SET HB_PATH=C:\Harbourm
SET HB_BIN_INSTALL=C:\Harbourm\bin
SET HB_LIB_INSTALL=C:\Harbourm\lib
SET HB_INC_INSTALL=C:\Harbourm\include
set HB_DOC_INSTALL=C:\Harbourm\doc
SET INCLUDE_DIR=C:\Mingw\include;C:\Harbourm\include
SET LIB_DIR=C:\Harbourm\lib;c:\Mingw\lib
4. Nuevamente abrimos la consola y escribimos: CD C:\HrbDevel
5. Escribimos: Bldm.bat
6. Escribimos: make_gnu.bat install
7. Se inicia la compilación y al terminar tenemos Harbour compilado con MinGW. en la carpeta C:\Harbourm