sansuido / sdl2

BSD 3-Clause "New" or "Revised" License
21 stars 3 forks source link

Failed to load dynamic library 'SDL2.dll': error code 126) #5

Open natandiasm opened 1 year ago

natandiasm commented 1 year ago

Erro on windows 11 image

sansuido commented 1 year ago

Hi, natandiasm. In order for the program to run in the windows environment, DLLs must be in the same directory as the executable. https://github.com/sansuido/sdl2/blob/main/SDL2.dll and more... Download the DLLs and copy it to the same location as the executable file.

Vonarian commented 1 year ago

Hi, natandiasm. In order for the program to run in the windows environment, DLLs must be in the same directory as the executable. https://github.com/sansuido/sdl2/blob/main/SDL2.dll and more... Download the DLLs and copy it to the same location as the executable file.

Do you plan to add the ability to load the DLLs ourselves? It can be a bit challenging to load all the DLLs in the same directory as exe every time we build an app :)

sansuido commented 1 year ago

Currently, I'm not thinking about fixing it with a full path. If you are in a Windows development environment, consider placing the dll somewhere in your path (in extreme cases, "C:\Windows\System32"). At the command prompt type "where SDL2.dll" and the dll where found is enabled.