How to compile FreeFem++ on Microsoft Windows (win32)
F. Hecht (Tokyo 7. oct 2012)
---------------------------------------------
WARNING NOW the window version is compiled under MINGW for version before version 3.20 , oct 7h 2012 , see the end of the file (obsolete now)
typo remark: all line in green are shell command under mingw32 shell
1. Download and install MINGW32
form http://sourceforge.net/projects/mingw/files/Installer/mingw-get-inst/mingw-get-inst-20120426/
Answer question in following windows :
1) do next
2) do next
3) use preload case
4) accept
5 ) select location of mingw on disk.
6) mingw menu name
7) select components
all except ada
8) do install
2. Under mingw32 shell install wget and unzip
mingw-get install msys-wget
mingw-get.exe install msys-unzip
3. To install freeglut of win32 for the graphics part
wget http://files.transmissionzero.co.uk/software/development/GLUT/freeglut-MinGW.zip unzip freeglut-MinGW-2.8.0-1.mp.zip
cp freeglut/include/* /c/MinGW/include/GL/.
cp freeglut/lib*.a /c/MinGW/lib/.
cp freeglut/freeglut.dll /bin
4. install a good blas (OpenBlas) http://xianyi.github.com/OpenBLAS/
get from http://github.com/xianyi/OpenBLAS/tarball/v0.2.3
5. install MPI for // version HPC Pack 2008 SDK and HPC Pack 2008 R2 Service Pack 2
6. install inno setup to build installer :
http://www.xs4all.nl/~mlaan2/ispack/isetup-5.4.0.exe
7. GSL for gsl interface is take form
http://sourceforge.net/projects/mingw-cross/files/%5BLIB%5D%20GSL/mingw32-gsl-1.14-1/
9) To download the latest freefem++ with mercural
hg clone http://www.freefem.org/ff++/ff++
to update do to the last version:
hg pull
hg up
10) Finaly, the configure argument are :
./configure ’--enable-download’ ’FC=mingw32-gfortran’ ’F77=mingw32-gfortran’ ’CC=mingw32-gcc’ ’CXX=mingw32-g++’ ’-with-blas=/home/hecht/blas-x86/libgoto2.dll’ ’CXXFLAGS=-I/home/hecht/blas-x86’ ’--enable-generic’ ’--with-wget=wget’ ’MPIRUN=/c/Program Files/Microsoft HPC Pack 2008 R2/Bin/mpiexec.exe
-----------------------------------------------------------------------------------------------------------------------------
Ok until version 3.19-1 (but now this soft is to old to get form the web).
FIle version 30/11/2011 F. Hecht.
WARNING NOW the window version is compiled under MINGW (from version 3.11 14/01/2011 FH)
So the old dll are incompatible with the new version.
It is the fortran compiler under cygwin which is too old (not f90 under cygwin).
----------------------------------------------------------
The tools to be installed are:
1) Download and install MINGW32
http://sunet.dl.sourceforge.net/project/mingw/Automated%20MinGW%20Installer/mingw-get-inst/mingw-get-inst-20101030/mingw-get-inst-20101030.exe
launch:
mingw-get-inst-20101030.exe
Answer question in following windows :
1) do next
2) do next
3) use preload case
4) accept
5 ) select location of mingw on disk.
6) mingw menu name
7) select components
all except ada
8) do install
2) Download and install wget for --enable-download in configure
http://puzzle.dl.sourceforge.net/project/mingw/mingwPORT/Current%20Releases/wget-1.9.1-mingwPORT.tar.bz2
under mingw32 shell
do:
cd /c/users/loginname/download/
tar jxvf wget-1.9.1-mingwPORT.tar.bz2
cp
extract and move wget.exe in /usr/bin
3) The glut of win32 from
wget http://web.cs.wpi.edu/~gogo/courses/mingw/winglut.zip
or
wget http://files.transmissionzero.co.uk/software/development/GLUT/freeglut-MinGW.zip
The location of include file must be
c:\mingw\include\GL\glut.h
c:\mingw\include\GL\gl.h
c:\mingw\include|GL/glu.h
add the glut32.dll or freeglut.dll in you directory in the 2 directories:
$ find /c/MinGW -name glut
/c/MinGW/bin/glut32.dll
/c/MinGW/lib/glut32.dll
4) the good blas now is:
http://www.tacc.utexas.edu/tacc-projects/gotoblas2/downloads/
Try to compile
5) install MPI for // version
HPC Pack 2008 SDK
http://www.microsoft.com/download/en/details.aspx?id=10505
HPC Pack 2008 R2 Service Pack 2
http://www.microsoft.com/download/en/details.aspx?id=26646
6) install inno setup to build installer:
http://www.xs4all.nl/~mlaan2/ispack/isetup-5.4.0.exe
7) GSL for gsl interface from
Download Now! mingw32-gsl-1.14-1.zip (3.5 MB)
8) download mercurail for windows from:
9) To download the latest freefem++ with mercural
hg clone http://www.freefem.org/ff++/ff++
to update do to the last version:
hg pull
hg up
Finaly, the configure argument are:
cd ff++
./configure '--enable-download' 'FC=mingw32-gfortran' 'F77=mingw32-gfortran' 'CC=mingw32-gcc' 'CXX=mingw32-g++' '-with-blas=/home/hecht/blas-x86/libgoto2.dll' 'CXXFLAGS=-I/home/hecht/blas-x86' '--enable-generic' '--with-wget=wget' 'MPIRUN=/c/Program Files/Microsoft HPC Pack 2008 R2/Bin/mpiexec.exe'
if erreor where building DOC do:
touch DOC/freefem++doc.pdf
Good Luck …