zepto8
zepto8 copied to clipboard
Compilation error
So I've been trying to compile zepto8, and I managed to compile it up to these errors:
In file included from pico8/cart.h:21,
from player.h:21,
from zepto8.cpp:23:
./pico8/memory.h:315:27: error: member ‘z8::pico8::custom_font_t z8::pico8::memory::<unnamed union>::<unnamed struct>::custom_font’ with constructor not allowed in anonymous aggregate
315 | custom_font_t custom_font;
| ^~~~~~~~~~~
./pico8/memory.h:315:27: error: member ‘z8::pico8::custom_font_t z8::pico8::memory::<unnamed union>::<unnamed struct>::custom_font’ with copy assignment operator not allowed in anonymous aggregate
I noticed that the file throwing the error has this note about nameless unions... before the nameless union that is seemingly causing the error. https://github.com/samhocevar/zepto8/blob/9d7a6d49f13f50387089df6e9c00fb3fb84c8019/src/pico8/memory.h#L297-L298
Am I doing something wrong? I can't really find anything useful online about this weird error, so I didn't bother trying to change any code.
Are you using GCC? If so, which version is it, and can you maybe try clang to see if they agree on the error?
I believe version 12.2.1.
~~How can I switch to clang? I just ran the bootstraps and it set everything up for me~~ (btw it's worth nothing I had to run the bootstrap twice for some reason)
EDIT: Found out how to configure it to compile with clang, but while Lol Engine compiled (as it did with GCC), and zepto8 seemed to be able to further compile, there were various errors that prevented it from compiling, mostly with zlib. I couldn't really make sense of them, though.
EDIT 2: GCC 11 also doesn't work. What compiler are you using?