Help with Makefile Error: No Rule to Make Target

0
0
Asked By CodeCrafter123 On

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/

1 Answer

Answered By DebugMaster99 On

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!

FixItFelix88 -

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.

CleverCoder22 -

My Makefile is exactly as shown in the tutorial examples. I just typed "make" to run it.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.