niuus / Snes9xRX

Snes9x RX - A port of Snes9x for Wii, forked from Snes9x GX
Other
86 stars 15 forks source link

Compilation error due to MXML #71

Open EeveeEuphoria opened 3 weeks ago

EeveeEuphoria commented 3 weeks ago

Hey there, it seems an updated version of MXML causes compilation issues. Trying to compile this under Arch Linux (in distrobox), using ppc-mxml 3.3.1-1 yields this error:

preferences.cpp
/home/zesi/Documents/repos/Snes9xRX/source/preferences.cpp: In function 'const char* XMLSaveCallback(mxml_node_t*, int)':
/home/zesi/Documents/repos/Snes9xRX/source/preferences.cpp:91:20: error: invalid use of incomplete type 'mxml_node_t' {aka 'struct _mxml_node_s'}
   91 |         name = node->value.element.name;
      |                    ^~
In file included from /home/zesi/Documents/repos/Snes9xRX/source/preferences.cpp:19:
/opt/devkitpro/portlibs/ppc/include/mxml.h:97:16: note: forward declaration of 'mxml_node_t' {aka 'struct _mxml_node_s'}
   97 | typedef struct _mxml_node_s mxml_node_t;        /**** An XML node. ****/
      |                ^~~~~~~~~~~~
make[2]: *** [/opt/devkitpro/devkitPPC/base_rules:15: preferences.o] Error 1
make[1]: *** [Makefile.gc:114: build_gc] Error 2
make[1]: Leaving directory '/home/zesi/Documents/repos/Snes9xRX'
make: *** [Makefile:19: gc] Error 2

This happens when trying to compiling both the Wii version and the GameCube version.

EeveeEuphoria commented 3 weeks ago

Hey I figured it out, if you do the same thing this commit did to SNEX9xGX, you can fix it.

I'd make a pull request, but it seems niuus has been MIA for over a year and a half, so... not sure if that's worth doing.

https://github.com/dborth/snes9xgx/commit/2817d8c4f839947787e06d7c7566a072e11b0225#diff-622dd5f3aaaff77d435e7fb37e8aaf9b86bd5a4f568aaabf18b026df2ea77e3cR90

EeveeEuphoria commented 3 weeks ago

Unfortunately it seems further issues prevent compilation though...