Code::Blocks IDE for Fortran
Code::Blocks is a free, cross platform Integrated Development Environment (IDE) oriented towards the C/C++ language. You can find more information at its home page (www.codeblocks.org).
I want to make Code::Blocks more useful for Fortran programmers. I have added some features which are not present in official Code::Blocks distribution. First of all, I am developing a plugin called FortranProject. Additionally I have added the support of some Fortran compilers and some more. With these addons the Code::Blocks can serve as a good Fortran IDE. Pre-built binaries available for Windows and Linux.
News
(2012.05.12)
C::B for Fortran IDE 0.8_RC2 is out. In this pre-release:- All bugs reported for RC1 should be fixed. If you will find a bug which was reported for RC1, please report it again.
- Added support for submodules (F2008 feature). Code-completion, call-tips and tool-tips should work in submodules.
- Added button “Make current item visible” on FSymbols browser tab. It will help you quickly find your current location - home (it is always good to know where is your home ;) ).
- Added support for Oracle Fortran compiler on Linux.
(2012.02.21)
A new release 0.8_RC1 is out. It contains most of changes which are going to be released in the final v0.8. This RC1 build is based on Debugger branch of Code::Blocks. Developers of C::B have made many changes related to the support of debugger in this C::B branch.
Changes related to Fortran:
- Added support of associate-construct and block-construct (F2003 / F2008).
- Better support of internal procedures.
- Local variables can be showed in Symbol browser. You can enable / disable this feature on FortranProject properties dialog. I have enabled it by default in RC1, but I think I will disable it in default configuration in the final release, because I find the symbol browser is overcrowded.
- FP plugin tries to follow ‘include’ statements when a code-completion list is build. This is important for some of the projects, e.g. if you use gtk-fortran project.
- Added the first refactoring of Fortran code: Fortran indentation plugin developed by YWX ( github.com/ywx/FormatFortranIndentPlugin ). Use: Plugins->FormatFortranIntentPlugin.
- Possibility to generate a Makefile (Tools->Fortran->Genarate Makefile). This feature should generate a working makefile for the active target in simple cases. Or the generated makefile can be used as a draft in more sophisticated projects. I think that this feature will simplify the communication of C::B users with the outside world.
- Intel debugger plugin (Debugger_IDB) on Linux. This plugin is a frontend to Intel’s idbc debugger. It enables debugging of Fortran 95/03 code directly from C::B. This plugin is just slightly modified GDB Debugger plugin. Unfortunately idbc is not available on Windows. Before first use you should setup path to ‘idbc’ executable on “Setting->Debugger->Intel debugger, Default, Executable path textbox” (usually /opt/Intel/bin/idbc).
(2011.11.29)
A new release 0.7.1 is out. It contains just minor changes to v0.7:
- Changed a bit the algorithm for building of file dependencies. This fixed the problem of building of some projects with many file dependencies (thanks to Hossein Talebi for his help).
- Added few changes in Code-Completion plugin (C++) to make it more friendly for Fortran.
- Fixed two minor bugs in Fortran file parser.
(2011.10.25)
The version 0.7 of C::B for Fortran is out. New in this release compared to version 0.6:
- Now the FP plugin tries to follow use associations and to include only those entities in code-completion list which can be accessed in a current code scope.
- Made improvements in the parser of Fortran files to be able to recognize public or private entities. The icon of private entity is marked with a red spot, e.g. the icon of public subroutine is
while the icon of private subroutine is
. The FP plugin includes only those entities in CC list which can be accessed (are not hidden) in a current scope. - Better integration with code-completion for C++: now you can use the same keyboard shortcut for code-completion in Fortran and in C++.
New features can be enabled (default) or disabled in FortranProject options dialog.
New features are helpful especially for larger projects or/and when third party libraries are used. If you use third party library in your code, you may find that it is quite convenient to include modules, which are distributed with this library, into your project. You should disable compilation of included module file in the file properties dialog. I tested such scenario with hdf5 and f03gl libraries. In combination with “only” keyword (e.g. use hdf5 only: h5awrite_f) you may have a limited number of procedures of the library in your CC list.
Here are screenshots which demonstrate new features.
I have created a new Google Group CBFortran for the users of C::B for Fortran. Everybody can join this group. On this group CBF users can ask questions about CBF or share his/her experience with others. I would like to use this group for announcing the new CB releases and etc.
(2011.06.16)
A release candidate 0.7_rc1 of IDE for Fortran is out. I decided to release RC version first, because I feel that new release should be tested first more extensively. I made quite many changes in the code of the plugin, and new features or even old ones may not work as is expected. You can download new files and test it with your code. Please let me know if it works for you. It is a good time to send me your bug reports and suggestions how to improve C::B (my email is This e-mail address is being protected from spambots. You need JavaScript enabled to view it ). Maybe I will be able to include it in the upcoming release.
(2010.11.18)
The version 0.6 of C::B for Fortran is out. An attempt was made to improve the object oriented programming style (Fortran 2003 features) support:
- added inherited components of derived type to the code-completion list (screenshot);
- added type-bound procedures to the code-completion list (screenshot) (not all possible cases are covered yet, e.g. generic type-bound procedures).
Additionally:
- comments, which go on the same line after variable declaration, are used as a description of that variable (screenshot)
- improved the support of generic procedures
- and some more
Features
- Editor with Fortran syntax highlighting (fixed and free form).
- Compilation of Fortran project directly from IDE. FortranProject plugin should care about Fortran file dependencies. Alternatively you can use your supplied makefile.
- Possibility to jump directly to the code line with an error (currently the support of gfortran, g95, Intel Fortran and PGI Fortran is implemented).
- Symbols browser with defined program units (functions, subroutines, modules etc.) in your project.
- Possibility to jump to code line with subroutine/function definition directly from editor (right click on the name and select "Jump to: 'name'") or from the symbols browser (double click on the name) or using menu 'Search->Jump to declaration'.
- Program debugging using GNU GDB or IDB (Intel's debugger on Linux).
- Completion of names when you type or when you press Ctrl+Space (you can change the key combinations in Editor's Settings). The support for subroutine/function names, the names of variables, the components of derived types and the type-bound procedures is implemented.
- Call-tips with subroutine/function argument list. Appears automatically or when you press Ctrl+Shift+Space.
- Appearance of tooltips when you hold mouse on variable or name of subroutine.
- Jump back and forth again to the edited file or the marked line (use toolbar or Alt+arrow).
- Possibility to generate a Makefile (Tools->Fortran->Genarate Makefile). This feature should generate a working makefile for the active target in simple cases. Or the generated makefile can be used as a draft in more sophisticated projects.
- and more
Screenshots
License
Code::Blocks (and FortranProject plugin) is distributed at GPLv3.Download
Installation
Just extract archive in your favored directory. To launch Code::Blocks run codeblocks.exe (on Win) or codeblocks_run.sh (on Linux). If you have another Code::Blocks distribution on your system you may want to start Code::Blocks as a portable app by executing startup script codeblocks_portable.bat (codeblocks_run_portable.sh). Code::Blocks saves all settings in installation directory if you launch program using codeblocks_portable.bat (codeblocks_run_portable.sh).Prerequest
Compiled version comes with all required *.dll packed in. So you should be able to run IDE. Linux version was compiled on recent Ubuntu but was successfully tested on some other Linux distributions too.
To be able to compile your Fortran files you should have installed Fortran compiler (gfortran, g95 or another one). Windows users should install MinGW on a system first. I would suggest to install MinGW from tdm-gcc.tdragon.net. If you are going to use gfortran, don't forget to mark it during installation. Alternatively you can install g95 (www.g95.org), but you need MinGW anyway. You may find useful to read gfortran-wiki page.
Setup of compiler's installation directory
You should read Notes page.User manual
You can download the Code::Blocks user manual from www.codeblocks.org/user-manual . You may find useful to look at short tutorial posted to CBFortran Google group: how to setup Fortran with C::B on Windows.Development
Project has page on Google Code. There you can report bugs, send your patches, download latest code from svn.
About me
My name is Darius Markauskas. I develop for this project on my spare time.
You can read here about my main work.
Have questions, suggestions? Found a bug?
Write me to:
This e-mail address is being protected from spambots. You need JavaScript enabled to view it


