4 This is free software see the source for copying conditions. Similarly, you can check gfortran’s version, with: 1 $ gfortran -versionĢ GNU Fortran (Rev2, Built by MSYS2 project) 9.2.0 3 Copyright (C) 2019 Free Software Foundation, Inc. There is NO 5 warranty not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. This is what I see, on my machine: 1 $ gcc -versionĢ gcc.exe (Rev2, Built by MSYS2 project) 9.2.0 3 Copyright (C) 2019 Free Software Foundation, Inc. #INSTALL GFORTRAN 9 64 BIT#Next, when you want to compile and run C, C++ or Fortran programs you will need to go to Windows Start → MSYS2 64 bit → MSYS2 MinGW 64-bit:īe careful which option you select, otherwise you will get errors when you try to use the compilers.Ĭheck GCC’s version with: 1 $ gcc -version Write exit in the MSYS2 Terminal to exit cleanly: 1 $ exit #INSTALL GFORTRAN 9 INSTALL#Optionally, if you know that you need it, you can install the Clang compiler with: 1 $ pacman -S mingw-w64-x86_64-clang Optionally, if you know that you need a Terminal based text editor like nano or vim you can install it with: 1 $ pacman -S vim Write Y when asked if you want to proceed with the installation. Press Enter to select the defaults when asked what you want to install from this group. Let’s install it: 1 $ pacman -S mingw-w64-x86_64-toolchain This is what I see on my machine, as of November 2019. #INSTALL GFORTRAN 9 64 BITS#Now, the list of packages is cleaner and only shows the 64 bits versions. We are interested in the 64 bits packages only, so a better option is to filter the results to show only the ones that contain the mingw64 string: 1 $ pacman -Ss gcc | grep mingw64 You should see a long list with all available packages that contain the gcc string. For example, if you want to search for gcc use the next command: 1 $ pacman -Ss gcc #INSTALL GFORTRAN 9 UPDATE#Once the update is finished, you are ready to search and install packages using the pacman package manager. Repeat the above command to finish the system upgrade: 1 $ pacman -Syu Please note, that in the above image you have three entries, the MSYS2 MSYS is the one you will want to use every time you need to install a package, search for a package or upgrade a package with the pacman package manager. Next, from your Windows Start menu, go to MSYS2 64 bit → MSYS2 MSYS: When finished, you should see a message about closing your terminal window. If you get an error with the above command, try this approach: 1 $ pacman -Sydd filesystem Write this in the MSYS Terminal: 1 $ pacman -SyuĪnd write Y when asked if you want to proceed with the installation. You should end up with a screen that asks if you want to Run MSYS2 64bit now., make sure it is checked and press Finish.Īfter the above step, a command window, or a Terminal, should open. Once the download is finished, start the installer and accept the defaults. I recommend to use the 64 bits version if possible: This means that when you build for example an OpenGL application it will use a native Windows Win32 window. Please note that all graphical libraries provided by MSYS2 use the native Win32 API. Perhaps someone can assist me make gfortran-7 as the alternative to gfortran-5.Another advantage of using the MSYS2 software distribution is that you will be able to install, if necessary, other C and C++ libraries like SDL2 or OpenCV using the pacman package manager which is included with MSYS2. #INSTALL GFORTRAN 9 HOW TO#I am now trying to figure out how to make gfortran-7 the default, currently –version shows gfortran-5. Perhaps because of gcc-7, gofrtran-7 has installed. I managed to install gfortran-7 with sudo apt-get install gfortran Hello again, my apologies to those who have spent time looking at my problem. Installing gfortran from gcc source, which provides for specifying languages to be installed gives an error (sfp-exceptions.c) at the make stage.ĭoes anyone know how I can have gfortran-7 installed. I have successfully installed gcc-7 with sudo sed -i 's/xenial/zesty/g' /etc//ubuntu-toolchain-r*.list
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |