Alright, I\'ve been trying to work with this for the longest time, and I simply can\'t seem to get it to work right. I have three files, main.c
, hello_world.c
You are not linking against hello_world.c.
An easy way to do this is to run this compilation command:
cc -o main main.c hello_world.c
More complicated projects often use build scripts or make files that separate the compilation and linking commands, but the above command (combining both steps) should do fine for small projects.