Build libmesh in windows under msys2/ mingw64

Indication about the libmesh building in windows in msys2 shell is provided in the libmesh official site. But it doesn't work well in my case: Windows 10 + msys2 with gcc 6.3.0 + mingw64 with gcc 7.2.0. Some additional points should be take into acoount.

For both msys2 and mingw64

1. Symbolic links are not available in both msys2 or mingw64. Those include:
    contrib/eigen/eigen;  contrib/exodusii/v5.09, v5.22; contrib/nemesis/v3.09, v5.22
    contrib/netcdf/v3,v4;  contrib/qhull/qhull
you should build symbolic link by 'ln' (just a hard copy) or by 'mklink' yourself.

Libmesh should be compiled successful under msys2 then. But under mingw64, futher modification should be added.

2. Some optional dependencies are available
   metis: see solution here.
   fparse: operation system dependent 'mkdir' and POSIX 'link' function
   netcdf: some problem in depdents upon hdf5
Disable them by using --disable-netcdf  --disable-metis --disable-fparser

3. Dependent upon netcdf still exists even '--disable-netcdf' is indicated. Comment out line 40558 (subdirs="$subdirs contrib/netcdf/v4") of file 'configure'

4. Inconsistence between 'exodusII_io.h' and 'exodussII_io.C'
    In 'exodusII_io.h' some varaibales are defined under the condition
----------------------------------
    #ifdef LIBMESH_HAVE_EXODUS_API
      UniquePtr<ExodusII_IO_Helper> exio_helper;
      int _timestep;
  #endif
--------------------------------
but are used unconditionedly in 'exodussII_io.C' at 
--------------------------------------------
function ExodusII_IO::write_timestep_discontinuous
--------------------------------------------
"#ifdef LIBMESH_HAVE_EXODUS_API" is also needed here.

Everthing then should be allright!

没有评论:

发表评论

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

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