I am new here and I don't know if it is the propper place for asking this type of questions.
I use Code::Blocks as IDE for C++. Everything works fine.
But I can' t figure out what is the relevant procedure for creating a Fortran program.
I have downloaded this version of Code:Blocks codeblocks-16.01mingw-setup.exe
Should I download CBFotran?
When I ask the program to create a Fortran application the following minimal file is created
A fortran95 program for G95
! By WQY
program main
implicit none
integer re_i
write(*,*) "Hello World!"
re_i = system("pause")
end
But the program cannot compile it.
Should I download indepentantly a compiler?
Code::Blocks is just an IDE; so, yes, you need to download an Compiler!
Note: The CB Installer with mingw in it's filename does have an C++/C Compiler; no idea if it has a FORTRAN compiler.
Tim S.
Thanks a lot for your the quick reponse.
How I can detect if there is already a compiler?
If there is not and supposing I have downloaded one like gfortran how can I guide Code:Blocks to detect the compiler?
Under the CB Installation folder there is a mingw folder look at the exe files in [the bin sub-folder]; does one have fortran in its name or not.
Tim S.
Just looked at the CB Downloads; I would guess the only one with an FORTRAN compiler is the one with fortran in its filename.
https://sourceforge.net/projects/codeblocks/files/Binaries/16.01/Windows/codeblocks-16.01mingw_fortran-setup.exe/download (https://sourceforge.net/projects/codeblocks/files/Binaries/16.01/Windows/codeblocks-16.01mingw_fortran-setup.exe/download)
Tim S.
Thank you very much for the useful replies.
I hope that I will not face a problem.
No, there is not a Fortran Compiler in
...\CodeBlocks\MinGW\bin
I guess I have to install one there.
In fact I followed the procedure described here
https://doc-14-7o-docs.googleusercontent.com/docs/securesc/ha0ro937gcuc7l7deffksulhg5h7mbp1/gl5vs6g6j5s5liu79nkbqjgnqhfblntt/1486152000000/02552863230247067214/*/1n5a91xiRR-LDm1xFC0MgCWn3QJ8sYHX0bz1GZ7cZo_BuYOxNYESpQfoIz8N9 (https://doc-14-7o-docs.googleusercontent.com/docs/securesc/ha0ro937gcuc7l7deffksulhg5h7mbp1/gl5vs6g6j5s5liu79nkbqjgnqhfblntt/1486152000000/02552863230247067214/*/1n5a91xiRR-LDm1xFC0MgCWn3QJ8sYHX0bz1GZ7cZo_BuYOxNYESpQfoIz8N9)
Everything works fine.
Read the instructions in this link:
http://gdurl.com/s20W
Then, download the file at this address and install it:
http://users.humboldt.edu/finneyb/gfortran-windows-20140629.exe
I hope this helps
Kousha