== Compiling using MingGW-w64 for both 32-bit and 64-bit == [wiki:UsersWikiWinCompile Back to Compiling in Windows] == 1. Installing Minimalist GNU for Windows-w64 (MinGW-w64) == The objective will be to try to use the MingGW-w64 toolchain instead of the standard MingW since it has support for both 32-bit and 64-bit compiling. Note: We are not successful yet, but just writing down our steps as we go along. Details of the prefixes of files can be found at [http://sourceforge.net/apps/trac/mingw-w64/wiki/download%20filename%20structure What to download] MingW-w64 site is [http://mingw-w64.sourceforge.net] * If you are on 64-bit Windows download one of the binary packages from [http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Automated%20Builds/] with name starting with '''mingw-w64-1.0-bin_i686-mingw_''' * If you are on 32-bit Windows download one of the binary packages from [http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Automated%20Builds/] with name starting with '''mingw-w32-1.0-bin_i686-mingw_''' * Extract your respective zip into a folder called C:\mingw_w64 * Add c:\mingw_w64\bin to your windows environment path variable == 2. Installing Msys == MSys is 32-bit but you can use it with your 32-bit or 64-bit mingw-w64. Instructions are here [http://sourceforge.net/apps/trac/mingw-w64/wiki/MSYS mingw-w64 with MSYS] and repeated here for completeness * download [http://sourceforge.net/projects/mingw-w64/files/External%20binary%20packages%20%28Win64%20hosted%29/MSYS%20%2832-bit%29/ Msys] MSYS-20110309.zip * Extract into a folder called C:\Msys * launch msys.bat * type {{{ sh /postinstall/pi.sh }}} When prompted type in C:/mingw_64/mingw Once done, type logout and the console should exit. == 3. Installing Autoconf, Automake and Libtool == Relaunch C:\mysy\msys.bat Verify which versions of these you have with autoconf --version etc. If they are not newer (or you get not found) than below then download and install. Download the source code from the GNU site and save to c:\projects * http://ftp.gnu.org/gnu/autoconf/autoconf-2.65.tar.gz * http://ftp.gnu.org/gnu/automake/automake-1.11.tar.gz * http://ftp.gnu.org/gnu/libtool/libtool-2.4.tar.xz {{{ cd /c/projects tar -xvf autoconf-2.65.tar.gz cd autoconf-2.65 ./configure --build=i686-w64-mingw32 --host=i686-w64-mingw32 (if you are building for 64-bit then use --build=x86_64-w64-mingw32) make && make install autoconf --version }}} repeat same exercise for automake For libtool {{{ cd /c/projects tar -xvf libtool-2.4.10.tar.gz cd libtool-2.4 ./configure --build=i686-w64-mingw32 --host=i686-w64-mingw32 --target=i686-w64-mingw32 --disable-shared #if you are building for 64-bit then use --host=x86_64-w64-mingw32 for the build,host,target make clean && make && make install libtool --version }}}