Setup and configure MinGW
MinGW is a tool that you can use to build some linux app under windows.
Official website: http://www.mingw.org/
You need to download three files (note that version can change):
- MinGW-5.1.3.exe: The runtime. I have installed the full version
- MSYS-1.0.10.exe: The command prompt with some tools
- msysDTK-1.0.1.exe: Building tools (autoconf, automake, make, ...)
Install them in the order above and you are ready to compile !
I have also installed the following updates:
Edit fsab (pico /etc/fstab) and be sure it is like this:
c:/programs/MinGW /mingw D:/data/repositories/mingw/local /local D:/data/repositories/mingw/local /usr/local
- The first entry is required and should be here by default after installing msys
- The second entry is optional: i just want to separate my local folder that is backuped and contains compiled data, from the installation directory
- The third line is required for some programs to configure scripts that needs a /usr/local (like glib)
Edit /etc/profile and add at the end:
export CFLAGS="-I/local/include" export LDFLAGS="-L/local/lib" export PKG_CONFIG_PATH="/local/lib/pkgconfig"
- First and second line are required for some configure scripts to run (like glib)
- Third line is used by pkg-config to search libraries
There is no cc.exe, so to build for example Berkeley DB you will need to symlick it to gcc.exe
ln -s /mingw/bin/gcc.exe /mingw/bin/cc.exe