You are not running under a MinGW x64 shell, but a MinGW UCRT (Universal C Runtime) x64 shell instead. This may work, but I’ve never tried it myself.
Thanks, Pierre > On 7 Nov 2022, at 2:29 PM, Mohammad Ali Yaqteen <mhyaqt...@sju.ac.kr> wrote: > > Do I have to follow all the steps in the first link as it says the following > in step 6: > > $ pacman -S mingw-w64-ucrt-x86_64-gcc > resolving dependencies... > looking for conflicting packages... > > Packages (15) mingw-w64-ucrt-x86_64-binutils-2.39-2 > mingw-w64-ucrt-x86_64-crt-git-10.0.0.r68.g6eb571448-1 > mingw-w64-ucrt-x86_64-gcc-libs-12.2.0-1 > mingw-w64-ucrt-x86_64-gmp-6.2.1-3 > mingw-w64-ucrt-x86_64-headers-git-10.0.0.r68.g6eb571448-1 > mingw-w64-ucrt-x86_64-isl-0.25-1 > mingw-w64-ucrt-x86_64-libiconv-1.17-1 > mingw-w64-ucrt-x86_64-libwinpthread-git-10.0.0.r68.g6eb571448-1 > mingw-w64-ucrt-x86_64-mpc-1.2.1-1 > mingw-w64-ucrt-x86_64-mpfr-4.1.0.p13-1 > mingw-w64-ucrt-x86_64-windows-default-manifest-6.4-4 > mingw-w64-ucrt-x86_64-winpthreads-git-10.0.0.r68.g6eb571448-1 > mingw-w64-ucrt-x86_64-zlib-1.2.12-1 > mingw-w64-ucrt-x86_64-zstd-1.5.2-2 > mingw-w64-ucrt-x86_64-gcc-12.2.0-1 > > Total Installed Size: 397.59 MiB > > :: Proceed with installation? [Y/n] > [... downloading and installation continues ...] > > Thanks > Ali > > > From: Pierre Jolivet <pie...@joliv.et <mailto:pie...@joliv.et>> > Sent: Monday, November 7, 2022 10:06 PM > To: Mohammad Ali Yaqteen <mhyaqt...@sju.ac.kr <mailto:mhyaqt...@sju.ac.kr>> > Cc: petsc-users <petsc-users@mcs.anl.gov <mailto:petsc-users@mcs.anl.gov>> > Subject: Re: [petsc-users] PETSc Windows Installation > > Please, keep the list in copy. > You can get MSYS2 from https://www.msys2.org/ > Then install the following packages: > https://github.com/FreeFem/FreeFem-sources/tree/master/etc/jenkins/deployRelease#windows-system > Also install MS-MPI: > https://www.microsoft.com/en-us/download/details.aspx?id=100593 > Configure and compile PETSc under a MSYS2 MinGW x64 shell. > Compile your code, and copy the binary. > Notice in my screenshot that there are two shells, the MinGW one for building > PETSc. > The Microsoft (native one) for launching the binary. > > Thanks, > Pierre > > <image001.png> > > > On 7 Nov 2022, at 1:53 PM, Mohammad Ali Yaqteen <mhyaqt...@sju.ac.kr > <mailto:mhyaqt...@sju.ac.kr>> wrote: > > Is there a guide for it? That would be very useful! Because I have been > trying a lot of things but every now and then there is a little step that is > either outdated or can’t run! > > Your help will be highly appreciated > > Thanks > Ali > > From: Pierre Jolivet <pie...@joliv.et <mailto:pie...@joliv.et>> > Sent: Monday, November 7, 2022 9:50 PM > To: Mohammad Ali Yaqteen <mhyaqt...@sju.ac.kr <mailto:mhyaqt...@sju.ac.kr>> > Cc: petsc-users <petsc-users@mcs.anl.gov <mailto:petsc-users@mcs.anl.gov>> > Subject: Re: [petsc-users] PETSc Windows Installation > > Or you can use MinGW, it’s not tricky, you don’t need to change any PETSc > code, and you can ship .exe for either x86_64 (mingw-w64-x86_64-gcc) or ARM > (mingw-w64-clang-aarch64-clang, without MPI). > > Thanks, > Pierre > > > > On 7 Nov 2022, at 1:38 PM, hamid badi <badi.ha...@gmail.com > <mailto:badi.ha...@gmail.com>> wrote: > > You can try gcc/clang cross-compilers, it's a little but tricky, i had to > change some petsc codes but it works fine. > > Le lun. 7 nov. 2022 à 13:30, Matthew Knepley <knep...@gmail.com > <mailto:knep...@gmail.com>> a écrit : > On Mon, Nov 7, 2022 at 7:11 AM Mohammad Ali Yaqteen <mhyaqt...@sju.ac.kr > <mailto:mhyaqt...@sju.ac.kr>> wrote: > Once I finish writing the code, the .exe file will not change. Can I make an > .exe file using WSL2 and VScode? > > If you build in WSL2, it will link to system libraries. You would probably > need to run in WSL2 after that. If you are planning > on running on native Windows, you likely need to build there. > > Thanks, > > Matt > > Thanks, > Ali > > From: Matthew Knepley <knep...@gmail.com <mailto:knep...@gmail.com>> > Sent: Monday, November 7, 2022 7:13 PM > To: Mohammad Ali Yaqteen <mhyaqt...@sju.ac.kr <mailto:mhyaqt...@sju.ac.kr>> > Cc: petsc-users <petsc-users@mcs.anl.gov <mailto:petsc-users@mcs.anl.gov>> > Subject: Re: [petsc-users] PETSc Windows Installation > > On Mon, Nov 7, 2022 at 12:21 AM Mohammad Ali Yaqteen <mhyaqt...@sju.ac.kr > <mailto:mhyaqt...@sju.ac.kr>> wrote: > I have written backend code for a software company. If WSL2 and VSCode(Linux) > can be called through a command line and executed at the backend, then it > will be great. But if I have to install WSL2 and other required things on > every other PC that will run that software, then I think I will be at a > disadvantage. What do you suggest? > > As long as you do not change the architecture and the compiler libraries are > available, you can run the executable. > > Thanks, > > Matt > > Thank you > Ali > > -----Original Message----- > From: Satish Balay <ba...@mcs.anl.gov <mailto:ba...@mcs.anl.gov>> > Sent: Monday, November 7, 2022 12:00 AM > To: Matthew Knepley <knep...@gmail.com <mailto:knep...@gmail.com>> > Cc: Mohammad Ali Yaqteen <mhyaqt...@sju.ac.kr <mailto:mhyaqt...@sju.ac.kr>>; > petsc-users@mcs.anl.gov <mailto:petsc-users@mcs.anl.gov> > Subject: Re: [petsc-users] PETSc Windows Installation > > Likely the compilers are not setup correctly as per instructions. > > https://petsc.org/release/install/windows/#installation-with-microsoft-intel-windows-compilers > > And if you do not have a specific windows need - and only need IDE - perhaps > a WSL2 (aka linux) install with VSCode(linux) might be the way to go. > > Satish > > On Sun, 6 Nov 2022, Matthew Knepley wrote: > > > We need to see configure.log to see what is going on. Can you send it? > > > > Thanks, > > > > Matt > > > > On Sun, Nov 6, 2022 at 4:29 AM Mohammad Ali Yaqteen > > <mhyaqt...@sju.ac.kr <mailto:mhyaqt...@sju.ac.kr>> > > wrote: > > > > > Dear Sir/Madam, > > > > > > > > > > > > I am installing PETSc on windows but it keeps giving me unexpected errors. > > > I want to use it on MS Visual Studio or Codeblocks. When I use the > > > command on your webpage (./configure --with-cc='win32fe cl' > > > --with-fc='win32fe ifort' --with-cxx='win32fe cl' --with-mpi=0 > > > --download-fblaslapack), I get the following error message: > > > > > > > > > > > > $ ./configure --with-cc='win32fe cl' --with-fc='win32fe ifort' > > > --with-cxx='win32fe cl' --with-mpi=0 --download-fblaslapack > > > > > > > > > ==================================================================== > > > ========================= > > > > > > Configuring PETSc to compile on your system > > > > > > > > > ==================================================================== > > > ========================= > > > > > > TESTING: checkCCompiler from > > > config.setCompilers(config/BuildSystem/config/setCompilers.py:1341)* > > > ******************************************************************** > > > ********** > > > > > > UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for > > > details): > > > > > > > > > -------------------------------------------------------------------- > > > ----------- > > > > > > C compiler you provided with -with-cc=win32fe cl cannot be found or > > > does not work. > > > > > > Cannot compile/link C with > > > /home/SEJONG/petsc-3.18.1/lib/petsc/bin/win32fe/win32fe cl. > > > > > > > > > > > > Kindly look into this problem! Your prompt response will highly be > > > appreciated > > > > > > > > > > > > Thank you > > > > > > Ali > > > > > > > > > > > > > -- > What most experimenters take for granted before they begin their experiments > is infinitely more interesting than any results to which their experiments > lead. > -- Norbert Wiener > > https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/> > > > -- > What most experimenters take for granted before they begin their experiments > is infinitely more interesting than any results to which their experiments > lead. > -- Norbert Wiener > > https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/> >