Closed mulle-nat closed 2 years ago
-fcommon
in Makefile gcc option if you gcc version >= 10
make CC=gcc-9
https://github.com/orangeduck/Corange/issues/59#issuecomment-643706411This error is caused by a change in the default behavior of the compiler. If you have an idea how to make it beautiful, we are waiting for the patch =)
I outlined two solutions. I am not sure though, which one is preferable.
I think marking these as extern makes the most sense to me.
You get a lot of linker errors like
The problem is that the
cengine.h
header defines global buffer variables, that are compiled into each file:There are two quick solutions
extern
incengine.h
and define them incengine.c
onceThis is thread-safer as a bonus, but putting 16K on the stack seems somewhat excessive.