In C header files don't have any special semantics for the compiler, they are just text that gets expanded inline by the pre-processor. It means that your variable definition will be seen three times by the linker. To avoid confusion, the linker doesn't know which one of the three values are correct. Even though they happen to have the same value this time, the linker is dumb and doesn't know that.
If you just have "int num;", it's a special case where the variable gets allocated as a common instead of data and the linker knows to unify commons in the final linking stage. Generally, I'd say it's bad form to use commons and header files should only have "extern int foo;" while the variable itself is defined in only one linking unit.