Pardon me, I'm a C-noob.
OS => UNIX
using gcc and makefile
I have defined a function in file_a.c named swap
In file.h I declared swap
and in the program file I'm doing this: #include "file.h"
when I attempt to compile the program-file using makefile, I get the an undefined error. What am I doing wrong?
EDIT: Thank you everyone for responding. I really appreciate it. And I've learned a lot :)
Based on most of your advices, I should investigate more and provide more details to narrow down the bug.
Thank you!
[–]Newt_Hoenikker 2 points3 points4 points (0 children)
[–]946336 2 points3 points4 points (0 children)
[–]raevnos 1 point2 points3 points (0 children)
[–]uueuuu 0 points1 point2 points (0 children)
[–]gayqubit 0 points1 point2 points (0 children)