1

I am trying to build my code but I keep getting this make: *** No targets specified and no makefile found. Stop.

I assume I need a makefile. How do I get this? Sorry I am a beginner coder

  • A `makefile` is a text file that you create and fill with instructions for the compiler on how to build your project. Here's a [simple example](https://stackoverflow.com/questions/16931770) that shows what a makefile might look like. You can find all sorts of examples and information by searching for `[c] [makefile]` in the search box above. But really you need to find some good documentation. – user3386109 Oct 22 '18 at 23:50
  • suggest reading the MAN page for `make` and since it is such a 'large' feature program, suggest reading the manual, several manual formats are available at: [make manual](https://www.gnu.org/software/make/manual) – user3629249 Oct 23 '18 at 00:10
  • actually, a 'makefile' is instructions to the `make` utility and can pass some commands through to other programs, like the `gcc` compiler – user3629249 Oct 23 '18 at 00:11

1 Answers1

2

When Using Xcode with C you need to first: Click File Click New Click Project

Select macOS Select Command Line Tool Hit Next

Enter a Name for the Program Enter any organization name you would like Select C language Hit Next

Save the file to desired location Hit Create

Click Main.c on the left column Enter code (A hello world program is automatically pre written)

To Run Code: Hit the Play button in the top left

If you get an error, make sure that the scheme is set to your program name and to My Mac. This is located right next to the play and stop button.

Hopefully this helps. Let me know if you have any questions.

JByerline
  • 35
  • 6