When I ask which version of gcc I have, I get the following:
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version 9.1.0 (clang-902.0.39.2) Target: x86_64-apple-darwin17.6.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
When I try to get information about gcc:
ls -la /usr/bin |grep gcc
-rwxr-xr-x 1 root wheel 18288 May 29 2018 gcc -rwxr-xr-x 1 root wheel 2043 Sep 26 2016 gccmakedep lrwxr-xr-x 1 root wheel 5 Mar 28 2018 llvm-gcc -> clang
I am using MacOS 10.13.5, and the reason that I want to use gcc instead of clang is because I have code I want to run in MATLAB that is in C, but I can't compile the code with clang, because fopenmp is unsupported.
When I try to compile just the matlab part of the program so that I can run it with a matlab interface:
I get the following error:
gcc -std=c99 -pedantic -Wall -O3 -fopenmp -DSSHT_VERSION=\"1.2b1\"...
clang: error: unsupported option '-fopenmp'
export PATH=/usr/bin export CXX=/usr/local/Cellar/gcc/8.2.0/bin/g++-8 export CC=/usr/local/Cellar/gcc/8.2.0/bin/gcc-8
to my code.