Global variables defined in headers will cause duplicate symbols linkage error when this header is included in multiple source files. We should declare it by extern in header and define it in c source file.
http://stackoverflow.com/questions/1433204/how-do-i-use-extern-to-share-variables-between-source-files-in-c
Comment From: oranagra
Closing this one in favor of #6900. if you can, please test the changes in that PR and acknowledge that they indeed solve the problem. and post feedback in #6900.