gak / gravit

A gravity simulator
http://gravit.slowchop.com/
GNU General Public License v2.0
66 stars 15 forks source link

gravit: fix build on gcc-10 (-fno-common) #100

Closed trofi closed 2 years ago

trofi commented 2 years ago

gcc-10 changed the default from -fcommon to fno-common: https://gcc.gnu.org/PR85678

As a result build fails as:

ld: tool.o:(.bss+0x0): multiple definition of `view'; color.o:(.bss+0x0): first defined here
ld: tool.o:(.bss+0x820): multiple definition of `video'; color.o:(.bss+0x820): first defined here
ld: png_save.o:(.bss+0x0): multiple definition of `view'; color.o:(.bss+0x0): first defined here

The change leaves variable definitions only in C files.

gak commented 2 years ago

Hi! Thanks for the PR. I'm not maintaining this project any more, but I've merged it in anyway!