C++ compiler needs to know functopn prototype to compile function call. GlobalFunctions.h
contains mathadd function prototype. This is enough for compiler to compiler successfully Form1.cpp. mathadd is marked as external reference in Form1.obj, because function implementation is missing.
Compiling random_dice_wfa.cpp, compiler finds actual mathadd implementation.
Finally, linker links Form1.cpp and random_dice_wfa.cpp. At this stage it resolves external mathadd reference.