Ask coding questions

← Back to all posts
Makefile
darkdarcool (91)

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):

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

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

Answered by Coder100 (16968) [earned 5 cycles]
View Answer
Comments
hotnewtop
Coder100 (16968)

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

Basically $^ is empty.

darkdarcool (91)

@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.

Coder100 (16968)

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

Coder100 (16968)

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

darkdarcool (91)

@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.

darkdarcool (91)

@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.

darkdarcool (91)

@Coder100
Alright I'm on now, I'll share