Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using 'make' on OS X

I have a MacBook Pro that I'm trying to do some development on.

I have a program I want to build, and when I went to use make to build it, I got a "command not found" error. I did some googling and Stack Overflow searches and it doesn't look like this is a common problem. Why don't I have make installed and how do I get it?

I'm extra confused, because I know I used it relatively recently (in the past month or so) when I was on this laptop.

like image 401
Alex Avatar asked Sep 24 '09 06:09

Alex


People also ask

Does make work on macOS?

Yes, Alex. Upgrading to SL seems to wipe out a number of development tools, including gcc and make. For me, I upgraded XCode to 3.2 and along with that, installed the development tools. Well you can download a make from somewhere else.

How do you make a command on a Mac?

In the Terminal app on your Mac, press the Up Arrow key. The last command you entered appears on the command line. Continue pressing the Up Arrow key until you see the command you want, then press Return.

How do I download Makefile on Mac?

Go to Xcode/Preferences. Click the "Downloads" tab. Click "Components". Click "Install" on the command line tools line.


2 Answers

For those of you who get to this page using Xcode 4.3 and Lion, the command line tools are no longer bundled by default, and there is no /Developer anymore. To install them, open Xcode, go to Preferences -> Downloads -> Components -> Command Line Tools. This should install make, gcc etc.

like image 188
Daniel Avatar answered Sep 22 '22 03:09

Daniel


Have you installed the Apple developer tools? What happens if you type gcc -v ?

It look as if you do not have downloaded the development stuff. You can get it for free (after registration) from http://developer.apple.com/

like image 28
Friedrich Avatar answered Sep 20 '22 03:09

Friedrich