Error: "no rule to make target 'cg.h', needed by 'quadraticPlacer.o' Stop."

Error: "no rule to make target 'cg.h', needed by 'quadraticPlacer.o' Stop."

by Carlo Maria Musso -
Number of replies: 2

Good afternoon, I am writing the Makefile for the big project in assignment 2. I think I correctly typed the dependency commands and the commands that permit the compiler to correctly search in the right folders for the header files but I am still getting this error when running "make".

  • make: ***  "No rule to make target 'cg.h', needed by 'quadraticPlacer.o'   Stop."

All other files except quadraticPlacer.c and ourPlacer.c compile correctly their  " .o ", as a consequence the executable main is not produced. I tried looking online for some answers but didn't find much except the advise to re-clone the git and recompile everything (which I tried but didn't work).  Do you have any advise on what could be the problem? 

I thank you in advance for your time.


Attachment Capture d’écran 2020-03-04 à 14.26.13.png
In reply to Carlo Maria Musso

Re: Error: "no rule to make target 'cg.h', needed by 'quadraticPlacer.o' Stop."

by Jean-Cédric Chappelier -

Sorry but it is part of the assignment objectives to figure this one out by yourself (understanding the way you describe things to make; maybe reviewing the documentation in more detail once again).

Hint: where does this message comes from exactly (I mean: find its reason/its source)? Who (make, compiler, linker) is telling you this and why?


In reply to Jean-Cédric Chappelier

Re: Error: "no rule to make target 'cg.h', needed by 'quadraticPlacer.o' Stop."

by Carlo Maria Musso -
I understand, I will try to figure it out, thank you.