The reason for this problem is caused by changing a gcc10 default setting from -fcommon to -fno-common and is documented e.g. here https://stackoverflow.com/questions/65412785/multiple-definition-error-when-linking-c-but-only-on-mingw.