Simply Fortran is a complete Fortran solution for Apple macOS. Designed from the beginning for the Fortran language, Simply Fortran delivers a reliable Fortran compiler with all the necessary productivity tools that professionals expect. The Simply Fortran package includes a configured Fortran compiler, an integrated development environment, including an integrated debugger, and a collection of other development necessities.
Simply Fortran's development environment brings the professional features to improve the Fortran developer's productivity whether working with legacy libraries bases or authoring new programs. Having been designed for Fortran, the Simply Fortran editor provides sensible behavior when working with fixed-format Fortran source code, including Fortran-aware block indenting and commenting. The editor provides inline, real-time syntax information, highlighting potential problems as the developer types. The context-sensitive autocomplete feature proposes variables, subtroutines, and functions that are visible within the current scope. The development environment also makes managing large-scale projects easy. When working with modern Fortran, Simply Fortran will handle the calculation of module dependencies automatically, correctly compiling Fortran source files in the proper order. The development environment allows viewing a structural outline of the entire project, searching for specific Fortran modules, function, or subroutines, and automatically renaming Fortran components project-wide.
Install Fortran Compiler Mac
Simply Fortran is a complete Fortran solution for Apple macOS. Designed from the beginning for interoperability with GNU Fortran, Simply Fortran delivers a reliable Fortran compiler on the macOS. Re free Fortran compilers. Gfortran is part of gcc (gcc stands for GNU Compiler Collection not just the name of GNU's c compiler) Xcode now does not install gcc (even via command line tools) gcc is a link or wrapper to clang. As to installation my first attempt would be via a package manager like Macports or Homebrew or fink.
Simply Fortran includes a fully configured installation of the GNU Fortran compiler. After installing Simply Fortran, there is nothing more necessary to begin compiling source code, and the developer need not ever use the command line (unless he or she prefers to do so). The compiler features compatibility with legacy Fortran source code as well as supporting all of the Fortran 90 and 95 standards and most of the Fortran 2003 and 2008 standards.
Contents
Code::Blocks is a free, cross platform Integrated Development Environment (IDE) (www.codeblocks.org). This site is for those, who would like to use Code::Blocks IDE for Fortran. Here you can find a customized (more or less) version of IDE oriented towards Fortran language (pre-built binaries for Linux and Windows are available). Also you can find some useful information about how to use it for programming with Fortran.
Note: FortranProject plugin, which makes C::B useful for Fortran, currently is included in an official Code::Blocks distribution for Windows (but not for Linux).
News
(26.07.2021)
A new release v1.8 is out. Improvements in this release:
Considerably improved support for the C Pre-Processor (PP) directives. During the parsing, every Fortran source code line now goes through the PP and only then the code is interpreted as a Fortran code. This improvement enables the code-completion in a code which uses such PP directives. As an example, I created a short tutorial how to use Fortran Template Library in CBFortran .
Code lines, which are excluded from the compilation by the use of the PP directives (such as '#ifdef') are marked (shadowed) in the C::B editor. This should improve readability of such code. See a screenshot below.
Added an option to the FortranProject plugin settings, which makes a word from the code-completion list always replace the word under the caret in the editor. Default behaviour is that the word under the caret is replaced only in a few circumstances.
(12.07.2020)
I took part inInternational Fortran Conference 2020 on 2-4 July 2020. There I spoked how Code::Blocks can be used for programming in Fortran. Presentation slides are below:
CodeBlocks_Fortran.odp (recommended, with gif animations)
CodeBlocks_Fortran.pdf (gif animations are not displayed)
(07.06.2020)
A new release v1.7 is out.
In this release Code::Blocks IDE was switched to use v3 of wxWidgets library. Perhaps, the biggest improvement is for users with HiDPI displays: now the used size of icons changes depending on the monitor's DPI.
There is more improvements for Fortran: Call-/Called-By tree now can show dependency between modules; dependency between Fortran files is accounted at a workspace level instead of a project level as it was before; some improvements in a logic used by smart-code-completion.
(12.01.2019)
A new release v1.6 is out. Improvements in this release:
Improvements in Debugger plugin:
Improved how arrays are displayed in the Watches window.
Improved how character, complex and dynamic-type variables are displayed in the Watches window. This feature requires GDB with Python support.
Implemented possibility to visualize content of 1D or 2D array as a curve or 2D surface directly from the debugger session. For this purpose Gnuplot external program is used. This feature requires the GDB with Python support and Gnuplot installed on the system. See the screen-shot below.
More information about debugging in C::B can be found in Debugging Fortran code in the Code::Blocks IDE.
Improvements in 'Call/Called by' tree view: now using the right-click menu is possible to go to the calling line.
Improved the logic behind the brace completion: more intelligent, more intuitive.
Implemented possibility to add an additional search path for the code-completion items in the project properties dialog. See screen-shot below.
Parser now interprets simple preprocessor directives. This should improve the work with code which contains such directives.
Added Flang compiler support. Compiler can be downloaded from github.com/flang-compiler.
(30.12.2018)
I have uploaded a new video tutorial on YouTube which demonstrates how to debug Fortran code using C::B:
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, flang, Intel Fortran, Oracle Solaris Studio 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 to the definition of procedure or the variable from code line where it is mentioned.
Possibility to generate a Makefile (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
License
Gnu Fortran Mac
Code::Blocks (and FortranProject plugin) is distributed at GPLv3.
User manual
You can download the Code::Blocks user manual from www.codeblocks.org/user-manual.
Development
The major part, which makes C::B IDE useful for Fortran, is FortranProject plugin. This plugin has a separate project for development onSourceforge.There you can download latest source code directly from svn.
Contribution
How to contribute to this project:
Spread a word about your experience with Code::Blocks.
Write tutorial about how to use C::B together with Fortran. Send it to CBFortran forum.
Prepare screencast (video tutorial) and upload it to e.g. Youtube. Drop link to CBFortran forum.
Suggest features you would like to be implemented into this IDE.
Report bugs to CBFortran forum or write directly to me.
Write a new plugin for Code::Blocks useful for Fortran developers.
Implement a new feature to FortranProject plugin or improve existing one. Send me a patch file.
About me
My name is Darius Markauskas. I develop for this project on my spare time.
Some info about my main job can be found here.
Have questions, suggestions? Found a bug?Write me to: darmar.lt@gmail.com