yglukhov / nimx

GUI library
MIT License
1.09k stars 75 forks source link

Failed to load sdl2 #504

Closed yrifl closed 1 year ago

yrifl commented 1 year ago

Compiled with command :

nim c -r --threads:on src/nim.nim

Error I got when running the program.

could not load: SDL2.dll
(bad format; library may be wrong architecture)

Nim Compiler Version 1.6.8 [Windows: amd64] Compiled at 2022-09-27

What should I do?

yrifl commented 1 year ago

I test the code from the readme you wrote.

yglukhov commented 1 year ago

Make sure sdl2.dll archiecture matches the binary

Tormund commented 1 year ago

So first of all, you sould download the SDL2.dll https://github.com/libsdl-org/SDL/releases/tag/release-2.24.2 Then place it somewhere you like it most corresponding to this documentation - https://learn.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-search-order

yrifl commented 1 year ago

So first of all, you should download the SDL2.dll https://github.com/libsdl-org/SDL/releases/tag/release-2.24.2 Then place it somewhere you like it most corresponding to this documentation - https://learn.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-search-order

Thank you it works!