User forums > Using Code::Blocks
fortran codeblocks
dimitris:
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
--- Code: --- A fortran95 program for G95
! By WQY
program main
implicit none
integer re_i
write(*,*) "Hello World!"
re_i = system("pause")
end
--- End code ---
But the program cannot compile it.
Should I download indepentantly a compiler?
stahta01:
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.
dimitris:
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?
stahta01:
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.
stahta01:
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
Tim S.
Navigation
[0] Message Index
[#] Next page
Go to full version