Compile error with mingw on OpenSUSE
Hello, I ran into a problem while compiling OpenFOAM for Windows.
I could not find anything about "mpi.h" except "export WM_MPLIB=MSMPI" in your cross compile mingw.
Please have a look at the following log and help me.
Thank you in advance.
kimjk@localhost:~/OpenFOAM/OpenFOAM-v2112> foam
kimjk@localhost:~/OpenFOAM/OpenFOAM-v2112> ./Allwmake -s -l
Logging wmake -all output to 'log.linux64MingwDPInt32Opt'
gcc=/usr/bin/gcc
clang=
mpirun=
make=/usr/bin/make
cmake=
wmake=/home/kimjk/OpenFOAM/OpenFOAM-v2112/wmake/wmake
m4=/usr/bin/m4
flex=/usr/bin/flex
compiler=/usr/bin/x86_64-w64-mingw32-g++
x86_64-w64-mingw32-g++ (SUSE Linux) 10.3.0
========================================
2022-03-21 18:17:47 +0900
Starting compile OpenFOAM-v2112 Allwmake
Mingw system compiler
linux64MingwDPInt32Opt, with MSMPI msmpi
========================================
built wmake-bin (linux64Mingw) with linux64Gcc
built wmake-bin (win64Mingw) with linux64Mingw
Skip ThirdParty (no directory)
========================================
Compile OpenFOAM libraries
========================================
ln: OpenFOAM/lnInclude
ln: OSspecific/MSwindows/lnInclude
wmake libo (MSwindows)
wmake libo
wmake libo dummy (mpi=dummy)
wmake libo dummy
wmake OpenFOAM
wmake dummy (mpi=MSMPI)
wmake dummy
wmake mpi (mpi=MSMPI:msmpi)
wmake mpi
Ctoo: UOPwrite.C
In file included from UOPwrite.C:33:
PstreamGlobals.H:42:10: fatal error: mpi.h: No such file or directory
42 | #include <mpi.h>
| ^~~~~~~
compilation terminated.
make: *** [/home/kimjk/OpenFOAM/OpenFOAM-v2112/wmake/rules/General/transform:35: /home/kimjk/OpenFOAM/OpenFOAM-v2112/build/linux64MingwDPInt32OptMSMPI/src/Pstream/mpi/UOPwrite.o] Error 1
Done logging to 'log.linux64MingwDPInt32Opt'
kimjk@localhost:~/OpenFOAM/OpenFOAM-v2112>