Looking for small C/C++ compiler available for OS X Catalina
C and C++ are different languages. Read and compare both n1570 (the C11 standard) and n3337 (the C++11 standard).
P.S. writing scripts for fluid dynamics, not even in need for OOP, just wonder why compilers nowadays weight over USB-sticks capacities from 2000s :(
Because recent C or C++ compilers are capable of very tricky optimizations, which programs on fluid dynamics practically need (be aware of OpenACC and of OpenMP and of OpenCL; your probably need one of them). See this draft report explaining more them.
If you need an unoptimizing C compiler, consider using tinycc or nwcc (and port them perhaps to MacOSX). Both are capable of compiling C code on MacOSX or Linux. Both are open source and coded in C.
You could use vim or GNU emacs as your source code editor. Or whatever Apple is giving on your Macbook. Choose also a good build automation tool (e.g. GNU make or ninja) to drive your C or C++ compiler and of course compile on the command line ...
But you probably could take advantage in your field of the many optimizations that either recent GCC (i.e. g++
for C++, gcc
for C) or recent Clang (i.e. clang++
for C++, clang
for C) are capable of. And both compilers have dozen of millions of source code lines.
If you want a scripting language to drive fluid dynamics libraries, consider using an existing one: Lua, Python, Guile, Ocaml ... comes to mind and can embed other huge libraries.
See also LinuxFromScratch
If you have lots of time to spend (and a few gigabytes of disk space) consider the following route: download some old C compiler; use it to compile nwcc
from source code. Download the source code of GCC 4.5 (it is coded in C). Compile it. You have now a C++ compiler g++-4.5
. Download the source code of GCC 9. Compile it with g++-4.5
. You have now an optimizing C++11 compiler g++-9
. That could take a week of your time.
Also considering installing server linux distribution just for C sake.
That choice is large, and matter of opinion. I would recommend a recent Debian or Ubuntu.