IBM announced two compilers for Mac OS X: “IBM XL Fortran Advanced Edition V8.1 for Mac OS X — A new platform supported in the IBM XL Fortran family” and “XL C/C Advanced Edition V6.0 for Mac OS X — A new platform for the IBM family of C/C compilers“. This is the oldest Fortran compiler available for OS X. Its been around since OS X was in a public beta state. Download this shell script: buildf2c, type chmod +x buildf2c and then sudo./buildf2c. The script will grab f2c source from Netlib repositories and install a f2c based compiler in /usr/local/.

Question or issue on macOS:

This is the oldest Fortran compiler available for OS X. Its been around since OS X was in a public beta state. Download this shell script: buildf2c, type chmod +x buildf2c and then sudo./buildf2c. The script will grab f2c source from Netlib repositories and install a f2c based compiler in /usr/local/. Fortran compilers are supported with Simulink only for creating Simulink S-functions using the MATLAB MEX command. The S-functions can be used with normal and accelerated simulations. Mac OS X On the Mac, no C compiler is supplied with MATLAB. If you use products that require one, Apple’s development environment for OS X (Xcode) is. And, there you have it, the gcc version 4.2.1 installed and working correctly on the latest version of Mac OS X 10.8.4. In Apple’s version of GCC, both cc and gcc are actually symbolic links to the llvm-gcc compiler. Similarly, c and g are links to llvm-g. For more information and examples see the following man pages.

I’m attempting to install texinfo 5.2, and I’m running into some issues during ./configure, which I believe are related to the C compiler. When I upgraded from Snow Leopard, I didn’t perform a clean install, so perhaps that’s part of the problem. Anyway, here’s what I’ve got:

I’ve read some of the other questions related to this, so I attempted to install Command Line Tools.

So it seems they’re not installed, although I’m running Xcode 5.1 installed from the App Store. From what I’ve read, Command Line Tools should be installed, but I’ve tried

C%2b%2b Compiler For Mac Os X

anyway, and when I tell it to install, a message pops up saying “Can’t install software because it is not currently available from the Software Update server.”

I found what I thought might be a work-around at http://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/, so I did the following:

Free Download C++ Compiler For Mac Os X

But I still have the ./configure issue.

C 2b 2b Compiler For Mac Os X64

For reference,

Although I did attempt to install gcc-4.7 the other day, and it’s currently living at Logitech gamepad drivers windows 10.

I’m not quite sure how to get it to run as a command from the command line because

is what I’m getting now, but that may be neither here nor there.

edit: Since this doesn’t directly answer my question about checking whether the C compiler works, I’m not submitting this as an answer. I just tried brew install texinfo, and that worked like a charm. At this point, I can’t really remember why I was trying to install texinfo from source nor can I remember what I needed it for (maybe something GNU Make-related or Emacs-related?).

How to solve this problem?

Solution no. 1:

I faced this same problem after installing xcode; All I had to do was run gcc. This then asked me to accept the xcode license. After, it just worked fine.

Hope this helps someone.

Solution no. 2:

I can’t really take credit for the answer, but the same things happened to me. I tried to get a ruby-1.9.3 ruby. RVM grabed gcc46 and told homebrew to install it. But then the rvm install command didn’t like that. So brew uninstall gcc46 and then brew install apple-gcc42 worked like a charm.

Solution no. 3:

For me the issue was I had not run

xcode-select --install

Once I did that everything ran fine

Solution no. 4:

Solution no. 5:

gcc -version

Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.

Solution no. 6:

I had similar “checking whether the C compiler works… no” problem in my yosemite mac.

I checked some things:

Then I installed it doing:

And it worked:

Solution no. 7:

Compiler

Similar problem while installing python3. My home brew was out dated. I simply update my home brew utility.

Solution no. 8:

I encountered this while setting up a React Native project. This solution worked.

Hope this helps!