View Single Post
Old 2020-12-09, 01:48   #4
Mar 2019

7·23 Posts

Possibly helpful?

"A common mistake in C is omitting extern when declaring a global variable in a header file. If the header is included by several files it results in multiple definitions of the same variable. In previous GCC versions this error is ignored. GCC 10 defaults to -fno-common, which means a linker error will now be reported. To fix this, use extern in header files when declaring global variables, and ensure each global is defined in exactly one C file."

Last fiddled with by mathwiz on 2020-12-09 at 01:49 Reason: quote relevant part of page
mathwiz is online now   Reply With Quote