Using make on OS X

I have a MacBook Pro where I'm trying to develop something.

I have a program that I want to build, and when I started using make , I got a "command not found" error. I did a google and qaru search and it doesn't seem to be a common problem. Why didn’t I install make and how do I get it?

I am very confused because I know that I used it relatively recently (last month or so) when I was on this laptop.

+63
terminal makefile macos
Sep 24 '09 at 6:07
source share
11 answers

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

It seems that you have not downloaded the development material. You can get it for free (after registration) from http://developer.apple.com/

+53
Sep 24 '09 at 6:10
source share

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

+129
Apr 24 2018-12-12T00:
source share

Now there is another way to install gcc toolchain on OS X via osx-gcc-installer , which includes:

  • NCA
  • LLVM
  • Clang
  • Developer CLI tools (cleanup, creation, etc.)
  • DevSDK (headers, etc.)

Download - 282 MB versus 3 GB for Xcode.

+18
Aug 11 2018-11-11T00:
source share

You will need to install the "Developer Tools", which are provided as additional packages on the OS X installation discs.

+13
Sep 24 '09 at 6:09
source share

For Xcode 4.1, you can simply add / Developer / usr / bin to the PATH environment variable. This is easy to do:

$ export PATH = $ PATH: / Developer / usr / bin

Also, be sure to update the ~ / .bashrc file (or ~ / .profile or ~ / .bash_login).

+9
Aug 09 '11 at 18:09
source share

In addition, if you transferred your user files and applications from one mac to another, you need to install Apple Developer Tools again. Migration Assistant does not consider installing developer tools.

+8
Feb 13 '10 at 21:07
source share

If you installed Xcode 4.3 and its command line tools, simply open Terminal and enter the following: In Xcode 4.3, enter the following in Terminal:

export PATH=$PATH:/Applications/Xcode.app/Contents/Developer/usr/bin

+5
Jul 28 2018-12-12T00:
source share

@ Daniel's suggestion worked great for me. to install

  make 
, open Xcode, go to Settings → Downloads → Components → Command Line Tools. Then you can test with
  gcc -v 
+5
Feb 17 '13 at 1:44
source share

I agree with two other answers: install Apple Developer Tools.

But it is also worth noting that OS X comes with ant and rake .

+4
Sept. 24 '09 at 6:16
source share

I believe that you can also get only Xcode command line tools, which are about 170 MB .. It is described in the brew configuration guide: https://github.com/mxcl/homebrew/wiki/installation and can be found here: https : //developer.apple.com/downloads/index.action#

Edit: this was mentioned above @josh

+1
Jul 23 2018-12-12T00:
source share

I found that developer tools are not as readily available as others. In El Capitan, in the terminal, I just used gcc -v, then he said gcc was not available and asked if I want to install the Apple Developer Tools command line. No Xcode download required. Terminal session below:

 Pauls-MBP:~ paulhillman$ gcc -v xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install. Choose an option in the dialog to download the command line developer tools. Pauls-MBP:~ paulhillman$ gcc -v Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version 7.3.0 (clang-703.0.31) Target: x86_64-apple-darwin15.6.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin 
+1
Nov 30 '16 at 3:42 on
source share



All Articles