Multiple definition and header-only libraries
问题 I have a C program with several c and h files. I decided to make one part of the program 'header-only' so I moved the code from c to h. Now I'm getting multiples definition problems and I have no idea why. e.g.: main.c includes utils.h vector.c includes utils.h I moved everything in utils.c to utils.h (and of course removed utils.c from the project). utils.h starts with #ifndef UTILS_H_ #define UTILS_H_ // and end with: #endif To be sure my guard was unique I tried changing it (e.g.: