Issue
I'm new to Makefile, and I tried to make a simplest Makefile. But I don't understand why even though I'm clearly in the correct path to the Makefile, the make command still says "make: *** No targets specified and no makefile found. Stop."?~
Here is my Makefile content :
CC=gcc
CFLAGS=-I.
exercise1: exercise1.c
$(CC) -o exercise1 exercise1.c
files in ..TH\Week1 : exercise1.c, Makefile
Solution
I just tried copying the Exercise1
folder to somewhere else, and it worked! I finally found the error. It's in the pathname to the Makefile. The path goes through a directory named LT Mạng
, and it seems cmd/Powershell/Terminal can't read the special characters. Just change the name of this folder again, for example: LT Mang
. It works fine.
Answered By - Fresher Answer Checked By - Marilyn (WPSolving Volunteer)