when trying to make the executable file in C, this error appears. I don't know what I did wrong, what can I do to fix this?
Error code
main.c
bib.h
print.c
I ran this two commands, but same error:
clang main.c -o main OR clang ./main.c -o main
gcc -Wall -o main ./main.c
You forgot to include the print.c file in your clang command. You must do this otherwise the compiler has no idea where the code to the void print(); function actually lives. You're essentially telling it that it exists but not telling it what it does so it throws.
clang main.c print.c -o main
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With