You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The name _Mix_Music is a reserved identifier, since it starts with an underscore followed by an uppercase letter. This was reported to the SDL_Mixer project, which updated the name:
typedefstructMix_Music Mix_Music;
The Arch Linux package has already updated to the new version. Unfortunately this causes the NAS2D build to break due to the incompatible name change.
Potentially we can revert to including the full SDL_mixer.h header file, rather than using a forward declare. We can possibly switch back to a forward declare once all supported builds have stabilized on the new version.
The problem of creating a forward declaration for an unknown struct is interesting.
The idea presented there of created a new struct that derives from the old one was interesting. Unfortunately that's not possible when the base struct type is an incomplete type.
// hstructMusicHandle;
// cppstructMusicHandle : public_Mix_Music {};
error: invalid use of incomplete type ‘struct _Mix_Music’
Maybe we shouldn't have Music as a standalone class, but rather something created or managed by MixerSDL. This might be similar to the idea of having RendererOpenGL own and manage Texture objects, rather than embedding that functionality in Image.
In
Music.h
there is a forward declaration:The name
_Mix_Music
is a reserved identifier, since it starts with an underscore followed by an uppercase letter. This was reported to the SDL_Mixer project, which updated the name:The Arch Linux package has already updated to the new version. Unfortunately this causes the NAS2D build to break due to the incompatible name change.
Potentially we can revert to including the full
SDL_mixer.h
header file, rather than using a forward declare. We can possibly switch back to a forward declare once all supported builds have stabilized on the new version.The problem of creating a forward declaration for an unknown struct is interesting.
https://stackoverflow.com/questions/7256436/forward-declarations-of-unnamed-struct
The idea presented there of created a new
struct
that derives from the old one was interesting. Unfortunately that's not possible when the basestruct
type is an incomplete type.Maybe we shouldn't have
Music
as a standalone class, but rather something created or managed byMixerSDL
. This might be similar to the idea of havingRendererOpenGL
own and manageTexture
objects, rather than embedding that functionality inImage
.Related:
The text was updated successfully, but these errors were encountered: