Quote Originally Posted by sprit
Can anyone explain me why MinGW compiler gives multiple definition error about functions implemented in the two separate cpps and not declared in the headers?
Even though functions are implemented in two separate source files, if they belong to same namespace, the linker would be confused which one to use for linking and ends up in throwing error.

Quote Originally Posted by sprit
I thought that cpp already provides a separate scope, if function declared and implemented only there and not exported, there shouldn't be any problem
Yes both the functions have different scope (as not declared in include files), but scopes are different for compiler & linker. For compiler, scope is single translated unit (including any extern symbols). Linker's job is to connect all the translation units, to so form the final executable, so for linker the scope includes all translations units, and hence the error.

C++ provides various ways to deal with situation, like namespace separation, object encapsulation using classes / structs, function overloading etc, you can use one of these methods.