sdl2 icon indicating copy to clipboard operation
sdl2 copied to clipboard

Why do the hsc generators require SDL2.dll?

Open expipiplus1 opened this issue 5 years ago • 2 comments

I bumped into this with several versions of GHC using Cabal and Stack in my CI.

Enum_hsc_make.exe failed while builing SDL2 on Windows because it can't find a DLL.

...
Starting     sdl2-2.5.3.0 (lib)
Building     sdl2-2.5.3.0 (lib)

Failed to build sdl2-2.5.3.0.
Build log (
cabal.exe: Failed to build sdl2-2.5.3.0. See the build log above for details.
C:\Users\runneradmin\AppData\Roaming\cabal\logs\ghc-8.10.1\sdl2-2.5.3.0-d521d69f91f87fa520a492e550c7b38e1d878d56.log

):
Preprocessing library for sdl2-2.5.3.0..
running dist\build\SDL\Raw\Enum_hsc_make.exe failed (exit code -1073741515)
rsp file was: "dist\\build\\SDL\\Raw\\hsc4E94.rsp"
output file:"dist\\build\\SDL\\Raw\\Enum.hs"
command was: dist\build\SDL\Raw\Enum_hsc_make.exe  >dist\build\SDL\Raw\Enum.hs
error: 

-1073741515 is STATUS_DLL_NOT_FOUND and this was caused because SDL2.dll wasn't in PATH.

Solving this wasn't a big deal, but it is quite surprising that SDL2.dll is required at build time!

expipiplus1 avatar Nov 02 '20 15:11 expipiplus1

Windows magic?

madjestic avatar Nov 06 '20 23:11 madjestic

I get the same issue. For future reference:

SDL\Raw\Enum_hsc_make.exe failed (exit code -1073741819)

In my case placing SDL2.dll in the same folder as my ghc binary fixed things.

gmtcrary avatar Feb 22 '22 01:02 gmtcrary