使用するプログラム実行用のサーバーではOSが異なるため,作業環境や操作方法が若干異なるため注意すること。
- Go to this website : http://sourceforge.net/projects/mingw-w64/files/?source=navbar
- Scroll down and find MinGW-W64-install.exe. Click that and download will begin.
- Run
MinGW-W64-install.exe
. Then, just click the 'Next' button - Once installation completed, go to PC >
C: > Program Files (x86)
>mingw-w64
>i686-8.1.0-posix-dwarf-rt_v6-rev0
, find mingw-w64.bat - Right click at mingw-w64 > Click 'Edit' > Delete line
cd C:/
> Save file
- Create a new folder. Copy the mingw-w64.bat and then paste into the folder we have created.
-
Write the code in a text editor any other IDEs. Make sure to save the file and the extension must end with ".f90".
-
Double click mingw-w64 > Black screen will pop out > type
gfortran test.f90
(note that test.f90 is a sample file name) -
This will compile the program u wrote and create a.exe file into the folder we have created earlier (same path) but don't close the mingw-w64.bat window.
-
In the next line , type
a.exe
-
The code will be displayed on the console(mingw-w64.bat)
-
Another way to compile is shown below.
gfortran test.f90 -o test | ^-------| <output> | <executed filename>