Fail to compile standalone with make -f makefile.wii
Issue #447
resolved
/media/demetris/c4487cfd-d71a-441b-b83d-23d8ce19475d/genesis-plus-gx/gx/config.h:117:43: error: 'MAXPATHLEN' undeclared here (not in a function); did you mean 'MAXNAMLEN'? char lastdir[FILETYPE_MAX][TYPE_RECENT][MAXPATHLEN];
Comments (3)
-
repo owner -
repo owner Indeed, according to this old post from devkitppc author https://devkitpro.org/viewtopic.php?f=7&t=2960&view=next, MAXPATHLEN was defined in unistd.h, which is included in Genesis Plus GX osd.h file.
For some reason, it was moved to sys/param.h in latest devkitppc version.
-
repo owner - changed status to resolved
should be fixed by this commit https://bitbucket.org/eke/genesis-plus-gx/commits/751e4bcaee45d3f29b433ad5d1fa85d6cd4c6687
- Log in to comment
No, it's MAXPATHLEN and this always compiled fine for me and surely others (as that file has not been modified for years) so it is likely happening because of some changes in latest devkitppc versions where that constant definition was moved in another include file, thus breaking code developed with an older version of the toolchain.
A quick google search indicates that other people encountered the same issue when trying to compile other 'old' Wii projects with latest toolchain and the solution seems to be adding #include <sys/param.h> in the code. Try adding it to osd.h in /gx directory and tell me if it compiles.