Help with Makefile Error: No Rule to Make Target

April 29, 2025 1 answer
Asked by not entirely sold
I'm following a Makefile tutorial, and I've run into an issue with the last example. I keep getting an error that says, "make: *** No rule to make target 'obj/hellomake.o', needed by 'hellomake'. Stop." I've attached a link to the tutorial I'm using. Here's the directory structure I'm working with: - ./ - include/ - hellomake.h - lib/ - Makefile - src/ - hellofunc.c - hellomake.c - obj/

Answers

apricot jam
Could you share what your Makefile looks like? The error suggests there might be an issue in one of your files that's not visible from the error message alone. Also, let us know which command you ran that resulted in that error!

!try the side entrance: My Makefile is exactly as shown in the tutorial examples. I just typed "make" to run it.

Paxu: Everything else compiles fine with other examples, so it must be something about example #5 that's causing the issue. I've checked my directory structure, and it looks correct to me. I also double-checked for proper formatting with tabs.

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions