ihhub / fheroes2

fheroes2 is a recreation of Heroes of Might and Magic II game engine.
https://ihhub.github.io/fheroes2/
GNU General Public License v2.0
2.72k stars 376 forks source link

SMPEG.DLL in SDL1 have depency to missing LIBSTDC++-6.DLL #6007

Closed GeorgeK1ng closed 1 year ago

GeorgeK1ng commented 2 years ago

Preliminary checks

Platform

Windows

Describe the bug

I have checked all files with Depency Walker and smpeg.dll have missing imports and can cause problems. I found this as real issue when testing fheroes2 under Windows XP SP3 here, but this bug have nothing to do with host as exist all Windows version and builds. This is from Windows 10 https://github.com/ihhub/fheroes2/issues/6002#issue-1415624307

image

image

If I understand correctly, here is solution how to compile it without needs of LIBSTDC++-+.DLL https://stackoverflow.com/questions/6404636/libstdc-6-dll-not-found

Save file

No save file

Additional info

No response

oleg-derevenetz commented 2 years ago

Hi @GeorgeK1ng we do not build this file ourselves, this file is taken from this pre-built archive distributed by libsdl.org:

https://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-devel-1.2.12-VC.zip

And I don't see any reason to build it ourselves, because we are (hopefully) going to drop SDL1 support completely in the foreseeable future. Also the required library is available in the Visual C++ redistributable package, it is available for download on the MS website.

GeorgeK1ng commented 2 years ago

@oleg-derevenetz Why you would like to drop SDL1? SDL2 can't be launched under Windows XP and users will be limited to Vista or newer hosts.

GeorgeK1ng commented 2 years ago

Otherwise, missing imports can be solved by these dll grabbed from internet, it's enough to place in game root. libstdc++-6.dll libgcc_s_dw2-1.dll https://www.mediafire.com/file/jvoxi8zzi3pidr2/SDL1_MissingDepenciesFix.7z/file

oleg-derevenetz commented 2 years ago

Hi @GeorgeK1ng because development of SDL1 is frozen a long ago (for example, the latest release of SDL_mixer 1.x is from 2013, almost 10 years ago), it does not support many of the features that SDL2 supports (for example, speaking of SDL_mixer 1.x, it doesn't support FluidSynth integration at all), so we have to add quirks to our code to circumvent this.

The WinXP market share was less than 1% already a year ago, it is not supported by MS since 2014. We can't support end-of-life WinXP and SDL1 endlessly.

ihhub commented 2 years ago

I think SMPEG library is not used anywhere in our code. We do not play any videos using SDL.

oleg-derevenetz commented 2 years ago

Hi @ihhub

I think SMPEG library is not used anywhere in our code. We do not play any videos using SDL.

I didn't test this specially, but AFAIK SMPEG was used by SDL_mixer 1.x to play MP3 music, because it is capable to decode MP3 too:

https://github.com/icculus/smpeg