Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error #32

Open
htv04 opened this issue Feb 10, 2023 · 2 comments
Open

Compilation error #32

htv04 opened this issue Feb 10, 2023 · 2 comments

Comments

@htv04
Copy link

htv04 commented Feb 10, 2023

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.

zepto8/src/pico8/memory.h

Lines 297 to 298 in 9d7a6d4

// A cart will have the code section at the same place as user_data. Cannot use a
// nameless union here because we’re aliased with hw_state which has constructors.

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.

@samhocevar
Copy link
Owner

Are you using GCC? If so, which version is it, and can you maybe try clang to see if they agree on the error?

@htv04
Copy link
Author

htv04 commented Feb 10, 2023

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants