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
(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.
(2011.08.09)
A release candidate 0.7_rc2 is out. The major problem with RC1 was the speed: the build of code-completion list was too slow. I put my efforts to speed-up the build of CC list. Performed tests showed, that RC2 builds CC list several times quicker than RC1. If you still think that C::B with your code is too slow, you can uncheck ‘Show only use associated entities’ option in FortranProject options dialog. Please let me know about your problems with RC2.
(2011.08.07)
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.
(2011.02.16)
I experienced a crash problem with C::B 0.6.1 on Windows caused by FortranProject plugin last week. Therefore I debugged a bit and changed few lines in a code of plugin in a hope that this will fix the bug. As a result I have uploaded new files of C::B for Windows (0.6.1-1). On Linux, it seems to me, there are no such problem.
If you have experienced the crash with 0.6.1 on Win, please download new build and report me if the problem has disappeared.
(2011.02.05)
A new minor release 0.6.1 is out. This is mostly bug fixing release:
- fixed few bugs in syntax highlighting and folding of Fortran files in underlying Scintilla text component. Now it is possible to adjust the highlighting for fixed-form Fortran files to get highlighting similar as in screenshot.
- fixed few bugs in parsing of Fortran files. An initial support for generic type-bound procedures and a menu item 'Search->Jump to declaration' were added.
So, I have made downloads of C::B in two flavors: one for users of Fortran only (without plugins not relevant for Fortran) and second for users who are going to perform mixed-language programming (all plugins which came with C::B are included).
(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.
- 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).
- 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 Ubuntu 9.10 but was successfully tested on Ubuntu 10.04, 10.10, Fedora 12, 13, 14 and openSuse 11.2, 11.3 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.
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 .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


