Uncategorized

C compiler cannot create executables mac mountain lion

If that is the case this would be "tools unique to the programming profession" or what ever it is that the FAQ says. I found this item because I'm experiencing a very similar problem trying to build an iOS library on a machine on which I've been definitely programming for some time.

Seems very valid to me! Ken Thomases Ken Thomases Thanks so much! Now for the next round of difficulties If you are reading this answer, this is definitely something you should do, but be aware that it will not solve your problem with other packages you are trying to build. So first install the command line tools then see the answer below by sterescott and that should take care of your problems.

APXS spits it out, but it has the wrong path so that's why you keep getting errors. This helped, but the final fix came from here: Command line Tools packages ars now available at: In my case I fixed the problem installing python by selecting Xcode 7.

./configure fails - C compiler cannot create executables.

Instead I had: This worked for me, thanks! I have a fresh installation of OSX James Great point. I too had a fresh installation of OSX Fixed it for me on Same thing on on Mavericks: First of all, make sure you have upgraded your commandline tools: You must agree to both license agreements below in order to use Xcode. This worked for me; Xcode was install clean Mavericks installation but the command-line tools weren't automatically installed.

This worked beautifully for me. I was installing iperf3 and I kept getting the error: I used "xcode-select --install" and it worked perfectly. This seems to fix the issue on Yosemite; even though XCode 6 now comes with the command tools pre-installed, and I could run clang from the command line,. I had already installed the command line tools in xcode but I mine still errored out on: Rimian Rimian In the config.

Account Options

So it was pretty clear this way the issue. I created the symlink and BAM! All good. After much searching this is exactly the trick I needed! The solution I used was the same as Mostafa, I had to export 2 variables: David Williams David Williams 3, 16 57 Thanks, this worked on OS X for running. Setting 'clang' as the compiler configure should use worked for me: The answer by steroscott fixed my issue a while back The important message from rbenv was for me: For most programs the llvm-gcc compiler works fine.

However, versions of Ruby older than 1. To build older versions of Ruby you must have the official GCC compiler installed on your system.

configure: error: C compiler cannot create executables · Issue # · rbenv/rbenv · GitHub

Install Homebrew's apple-gcc42 package with this command: I furiously read all of this page, hoping to find a solution for: Florin Odagiu Florin Odagiu 2 First get the gcc path using Command: This worked for me on Mac OS Mojave. C-Rock C-Rock 1. Vyacheslav Vyacheslav Sign up or log in Sign up using Google.

Sign up using Facebook.

Helpful answers

Sign up using Email and Password. Post as a guest Name.

Why can't the C compiler create executable? I showed you that the C compiler is installed correctly on my machine.

How to Install Python 3.6 on Mac OS X

Start Xcode, select 'Preferences', then 'Locations'. You'll notice a dropdown control at 'Command Line Tools'. Select the newest version, close the dialog window, then call brew again.

The actual error you are seeing is probably listed in config. That should issue an error like "xcode-select: Next, you could dig into the actual specific error log or you could try getting a gcc compiler instead of using Apple's llvm. By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service , privacy policy and cookie policy , and that your continued use of the website is subject to these policies.

Home Questions Tags Users Unanswered.

Context Navigation

Can't compile source code on mac Ask Question. I can also do gcc --version and I see Configured with: Configuring Apache Portable Runtime Utility library Mark but gcc is symlinked to clang by default, and in straightforward case the invocation is gcc -compatible. Have you installed the command line tools? Mike OK my bad it's not symlinked. However it does just run a copy of clang: Also if I recall correctly, the command gcc wouldn't even run without the command line tools installed.