make: *** No rule to make target 'population'. Stop. cs50

2.1k Views Asked by At

make: *** No rule to make target 'population'. Stop. No rule to make target 'population'. Stop.

I'm trying to compile cs50's population problem set-1 population. it doesn't works , showing this error message on terminal "make: *** No rule to make target 'population'. Stop.", later on I tried other file to compile it says also same ..

thanks in advance

2

There are 2 best solutions below

0
DinoCoderSaurus On BEST ANSWER

The terminal shows that make is being run from the home directory (`~/).

The file tree shows that population.c lives in ~/pset1/hello directory.

cd to the directory where the source code exists and then execute make.

0
Amirmahdi Tizchang On

you are in wrong directory, use ls in terminal to show you the directory you're in include which files. you are in some directory the file you want to compile, didn't create in this directory you are, use pwd in terminal to show your the address(path).