Skip to content
← Back to Community
Makefile
Profile icon
darkdarcool

Hi!
So, I was making some code on Visual Studio Code (mac) and encountered a makefile error, and I tried to fix it, but couldn't. So I was wondering if anyone could help me with this. Here is the layout(screenshot):

Screen Shot 2021-03-14 at 10.31.33 AM

And I get this error when I run is in the mac terminal:

Screen Shot 2021-03-14 at 10.37.08 AM

Can someone help me fix it? if you need it here is my makefile:

Screen Shot 2021-03-14 at 10.33.02 AM

Answered by Coder100 [earned 5 cycles]
View Answer
Voters
Profile icon
BenjaminDubin1
Profile icon
darkdarcool
Comments
hotnewtop
Profile icon
Coder100

The compiler said your makefile didn't work, and did not capture the files it was supposed to capture.

Basically $^ is empty.

Profile icon
darkdarcool

@Coder100

ah ok, I fixed it by deleting lines 13 and 14, but will take not of that next time I make a makefile, and because you are the only one to respond, you get 5 updoots.

Profile icon
Coder100

hmm yeah i'll keep looking at the makefile a bit confusing why it shouldn't work. Where did you find it?

@darkdarcool

Profile icon
Coder100

also lines 13-14 is supposed to precompile each file so you don't have to compile them again

@darkdarcool

Profile icon
darkdarcool

@Coder100

I was on a youtube tutorial on how compilers work because I was bored, and the guy made a makefile like that, and it didn't work for me. So I made a post. I still don't know why it didn't work. BTW, I was on visual studio code(mac). And I was using the mac terminal to run it. I can show you the source code.

Profile icon
Coder100

@darkdarcool
rip

ok sure

Profile icon
darkdarcool

@Coder100
, at like 10:00(Eastern Daylight Time), I can show you the source code on replit. That is when I start school so I will be by the computer.

Profile icon
darkdarcool

@Coder100

Alright I'm on now, I'll share

Profile icon
darkdarcool

@Coder100

k, finally shared