jdonnert / WVTICs

SPH initial conditions using Weighted Voronoi Tesselations
MIT License
7 stars 4 forks source link

Newer GNU binutils complains about multiple definitions of variables in headers. #18

Open bwkeller opened 1 year ago

bwkeller commented 1 year ago

The variables G in globals.h and Ngbcnt and Ngblist in tree.h do not need to be defined in the headers as globals. I'm not exactly sure when this change was introduced to gcc's behaviour, but I can compile the existing version of WVTICs with ld version 2.27, but not with 2.35.2.

I've removed the variables G, Ngbcnt, and Ngblist from the headers globals.h and tree.h, since they don't need to be defined in multiple locations (G is only ever used locally, and Ngbcnt and Ngblist are never used at all).