Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Contributions to C::B => Topic started by: tuli01 on March 10, 2011, 04:37:21 pm

Title: Adding a Fortran compiler
Post by: tuli01 on March 10, 2011, 04:37:21 pm
Hello,
I was looking for an open source IDE for C, C++ and Fortran for Windows 64 bit.
I just came across Code::Blocks and using the “codeblocks-10.05mingw-setup.exe” installer I was able to use it with a c compiler.
I need to add a Fortran compiler.
I downloaded “gfortran-4.6-Cygwin-i686.tar.bz2”, but I do not know how to include gfortran as a compiler that I can use in Code::Blocks.
I am not a professional programmer.
I am an engineer coding mostly scientific codes.
I am really anxious to use open source products and I would be grateful if someone would help me getting an open source Fortran compiler (ANY Fortran compiler) to work with Code::Blocks IDE.
I have a couple of 64 bit machines with XP pro and Windows 7.
Thank you
Tuli

PS I'm afraid I would need detailed instructions

Title: Re: Adding a Fortran compiler
Post by: seb_seb0 on March 10, 2011, 05:27:24 pm
Hello,

you have several solutions to investigate (I have tested none of them, I do not program in Fortran, so no guarantees it will work).
  
   1 - download a Fortran compiler. One is coming with GCC TDM version here:
http://tdm-gcc.tdragon.net/download  (http://tdm-gcc.tdragon.net/download)

   2 - try to configure CodeBlocks for Fortran. See this thread for more info:
http://forums.codeblocks.org/index.php/topic,13090.0.html (http://forums.codeblocks.org/index.php/topic,13090.0.html)

   3 - if this does not work, you can try with a Fortran plugin. There is one here:
http://forums.codeblocks.org/index.php/topic,11033.0.html (http://forums.codeblocks.org/index.php/topic,11033.0.html)
    You will have to compile the plugin yourself, and for that you will have to compile CodeBlocks (see here for instructions http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows (http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows))

   4 - there is also a fork of the Code::Blocks project, specialized for Fortran, here : http://darmar.vgtu.lt/ (http://darmar.vgtu.lt/)
   Be aware that this IDE is a different project than Code::Blocks - therefore do not expect support for it in this forum.

Good luck !

Sebastien
  
Title: Re: Adding a Fortran compiler
Post by: stahta01 on March 10, 2011, 05:32:11 pm
I suggest trying TDM Build of MinGW GCC instead of Cygwin; I have no idea how well FORTRAN will work under Code::Blocks.
I suggest you search for others using it on Code::Blocks forum.

http://tdm-gcc.tdragon.net/download

IIRC the "On-Demand Installer" has an option for FORTRAN.

Tim S.
Title: Re: Adding a Fortran compiler
Post by: seb_seb0 on March 10, 2011, 05:33:15 pm
Hello,

you have several solutions to investigate (I have tested none of them, I do not program in Fortran, so no guarantees it will work).
 
   1 - download a Fortran compiler. One is coming with GCC TDM version here:
http://tdm-gcc.tdragon.net/download  (http://tdm-gcc.tdragon.net/download)

   2 - try to configure CodeBlocks for Fortran. See this thread for more info:
http://forums.codeblocks.org/index.php/topic,13090.0.html (http://forums.codeblocks.org/index.php/topic,13090.0.html)

   3 - if this does not work, you can try with a Fortran plugin. There is one here:
http://forums.codeblocks.org/index.php/topic,11033.0.html (http://forums.codeblocks.org/index.php/topic,11033.0.html)
    You will have to compile the plugin yourself, and for that you will have to compile CodeBlocks (see here for instructions http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows (http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows))

   4 - there is also a fork of the Code::Blocks project, specialized for Fortran, here : http://darmar.vgtu.lt/ (http://darmar.vgtu.lt/)
   Be aware that this IDE is a different project than Code::Blocks - therefore do not expect support for it in this forum.

Good luck !

Sebastien
Title: Re: Adding a Fortran compiler
Post by: tuli01 on March 10, 2011, 07:03:51 pm
I did what you suggested. how do I have Code::Blocks connect to it?
Title: Re: Adding a Fortran compiler
Post by: stahta01 on March 10, 2011, 08:33:33 pm
http://wiki.codeblocks.org/index.php?title=Installing_Fortran_Compiler

You will get no more help from me; you need to learn how to read and how to search.

Note: You started this thread in the wrong sub-forum and seem incapable of searching.

Tim S.