Posted on October 12, 2019 by Paul

Updated 8 May 2020

Oct 07, 2019  Read all the technical details about macOS Catalina in the deep-dive. MacOS Catalina review: macOS Catalina Beta. Quick note: If you've been on the macOS Catalina Beta train but now, with the official release, you want to get off, just launch System Preferences, click on Software Update, click on the tiny Details text at the bottom left under the big gear icon, and then click on Restore. From the desert to the coast: macOS Mojave has given way to the next major version of the Mac operating system, called macOS Catalina.Revealed during Apple’s 2019 WWDC keynote in June, Catalina.

Dns-server: Fix netstat on Catalina #59207 perl5.28 build fails on Catalina with MacPorts 2.6.1 and Xcode 11.1 #59218 QLMarkdown and QLColorcode fail on Catalina 10.15 #59269 atlas returns segmentation fault with macOS 10.15 and Xcode 11 #59282 package py37-tensorflow does not build on mac os X 10.15 (catalina) #59316. MacOS Catalina; macOS Mojave; macOS High Sierra; macOS Sierra; OS X El Capitan; OS X Yosemite; OS X Mavericks; OS X Mountain Lion; Mac OS X v10.7 Lion; Mac OS X v10.6 Snow Leopard; Mac OS X v10.5 Leopard; Mac OS X v10.4 Tiger; Mac OS X v10.3 and earlier; Mac OS X Technologies; Classic Mac OS (OS9, OS8 & System 7) Photos for Mac; QuickTime. Feb 16, 2020  How to build/compile GCC 10 from source on macOS Catalina. (If you just need to install GCC 9.2 check my previous video Command.

In this tutorial, I will show you how to compile from source and install the current stable version of GCC on your macOS computer. The instructions from this tutorial were tested on Catalina (macOS 10.15).

Clang, the default compiler for macOS, supports only C, C++, Objective-C and Objective-C++. If you are interested in a modern Fortran compiler, e.g. you will need gfortran that comes with GCC. Another reason to have the latest stable version of GCC on your macOS is that it provides you with an alternative C and C++ compiler. Testing your code with two different compilers is always a good idea.

Building GCC 10 from sources could take some time, in my case it took about two hours on a MacBook Air with a 16GB of RAM.

In order to compile GCC from sources you will need a working C++ compiler. In the remaining of this article I will assume that you have installed the Command Line Tools for Xcode. At the time of this writing Apple’s Command Line Tools maps the gcc and g++ to clang and clang++. If you don’t have the Command Line Tools installed, open a Terminal and write:

which will guide you through the installation process.

Let’s start by creating a working folder:

Next, we can download and extract the latest stable version of GCC:

GCC 10 depends on a couple of other libraries (GSL, GMP, MPFR and ISL) that can be downloaded with:

Island

the above four prerequisites will be built during the GCC build.

We are ready to compile GCC now. Be prepared that this could take some time … Since I’m interested only in the C, C++ and Fortran compilers, this is the configure command I’ve used on my machine:

Gfortran For Mac Os Catalina

The above command instructs the configure app to add a prefix to all the resulting executable programs, so for example if you want to invoke GCC 10.1.0 you will write gcc-10.1, the gcc command will invoke Apple’s version of clang.

If you are interested in building more compilers available in the GCC collection modify the –enable-languages configure option.

And now, the final touches:

Grab a coffee, maybe a book, and wait … this should take approximately, depending on your computer configuration, an hour … or more … and about 4.15GB of your disk space for the build folder.

Install the compiled gcc in /usr/local/gcc-10.1.0:

Now, you can keep the new compiler completely isolated from your Apple’s gcc compiler and, when you need to use it, just modify your path by writing in Terminal:

If you want to avoid writing the above command each time you open a Terminal, save the above command in the file .zshrc from your Home folder, e.g:

You should be able to invoke any of the newly built compilers C, C++, Fortran …, invoking g++ is as simple as writing in your Terminal:

Remember to erase the working folder from your HOME if you want to recover some space:

Next, I’ll show you how to check if the compiler was properly installed by compiling and running a few examples. GCC 10 uses by default the C++14 standard and C11 for the C coders, you should be able to compile any valid C++14 code directly. In your favorite text editor, copy and save this test program (I’ll assume you will save the file in your Home directory):

Compiling and running the above lambda example:

We could also compile a C++ code that uses threads:

Next, we present a simple C++ code that uses regular expressions to check if the input read from stdin is a floating point number:

If you are a Fortran programmer, you can use some of the Fortran 2008 features like doconcurrent with gfortran-10.1:

The above code can be compiled with (assuming you’ve saved it as tst_concurrent_do.f90):

If you are interested in learning more about the new C++11/C++14 syntax I would recommend reading The C++ Programming Language by Bjarne Stroustrup.

or, Professional C++ by M. Gregoire, N. A. Solter, S. J. Kleper 2nd edition:

If you need to brush your Fortran knowledge a good book is Modern Fortran Explained by M. Metcalf, J. Reid and M. Cohen:


Fortran For Mac

Show Comments

Gnu Fortran Mac

  • Latest Version:

    Code::Blocks 17.12 LATEST

  • Requirements:

    Mac OS X 10.6 or later

  • Author / Product:

    Yiannis / Code::Blocks for Mac

  • Old Versions:

  • Filename:

    codeblocks-17.12_OSX64.dmg

  • MD5 Checksum:

    13e3610a2bc6f772228d844ea0e4c8d6

  • Details:

    Code::Blocks for Mac 2020 full offline installer setup for Mac

Fortran For Mac Os Catalina Version

Code::Blocks for Mac is a free C, C++ and Fortran IDE built to meet the most demanding needs of its users. It is designed to be very extensible and fully configurable. Finally, an IDE with all the features you need, having a consistent look, feel and operation across platforms.
Built around a plugin framework, Code::Blocks for macOS can be extended with plugins. Any kind of functionality can be added by installing/coding a plugin. For instance, compiling and debugging functionality is already provided by plugins!
Also Available: Download Code::Blocks for Windows