Build Elmer in MingW64

To compile Elmer-trunk-svn4252

1. Refer to the script suggested,  following script is adopted

#!/bin/sh -f
export ELMER_HOME=/c/Myprograms/Fortran/Elmer/elmertest
export ELMER_POST_HOME=$ELMER_HOME/share/elmerpost
export ELMER_FRONT_HOME=$ELMER_HOME/share/elmerfront

export PATH=$ELMER_HOME/bin:$PATH

export CC=x86_64-w64-mingw32-gcc
export CXX=x86_64-w64-mingw32-g++
export FC=x86_64-w64-mingw32-gfortran
export F77=x86_64-w64-mingw32-gfortran
export CPP=x86_64-w64-mingw32-cpp
export LDFLAGS="-L/c/Myprograms/Fortran/Elmer/elmertest/lib -Xlinker --stack=1000000000 "

modules="matc umfpack mathlibs elmergrid meshgen2d eio hutiter fem post front"

for m in $modules; do
  cd $m
  ./configure --prefix=$ELMER_HOME
  make
  make install
  cd ..
done

2. Type in ./configure. Several problems exists
1)  Makefiles generated includes -lm', which is supposed to link libm.a. You may need delete all of them.
2) cpp is needed even if you use export CPP=***. Just copy one with exactly this name.
3) Delete link of _muldc3.o in your Makefiles.

3.  Some link to AMD function in UMFPACK fails. Use offically one instead.
http://www.cise.ufl.edu/research/sparse/amd/

4. You may also need tcl/tk installed to compile Elmer GUI.

没有评论:

发表评论

VS Code下cmake, c++编译,调试环境的构成步骤

1   下载必须extension      按[Ctrl+Shift+X]打开extension窗口,选择安装"C/C++", "CMake", "CMake Tools" 2   在VSCode下打开作业目录 ...