Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems regarding SDL2 #511

Closed
tillfalko opened this issue Mar 22, 2023 · 3 comments
Closed

Problems regarding SDL2 #511

tillfalko opened this issue Mar 22, 2023 · 3 comments

Comments

@tillfalko
Copy link

(This is on a fresh nim install on Windows 11. This issue occurs whether the newest nim version is installed manually, or with choosenim. I tried both.)

Trying to run the README example script with nim c -r --threads:on main.nim results in

could not load: SDL2.dll
Error: execution of an external program failed: 'C:\Users\T\windev\n\main.exe '

nimble install sdl2 did not help. Eventually I was able to fix this by manually downloading the SDL2.dll file and putting it in the same directory as main.nim. I doubt that this is intended. Perhaps there is some obvious thing I am missing but as I am new to nim, this was very confusing.

I could also not get the nimx samples to work at all. No matter where I pasted SDL2.dll file, executing nake would always result in

c:/users/t/.choosenim/toolchains/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lSDL2
collect2.exe: error: ld returned 1 exit status
Error: execution of an external program failed: 'gcc.exe  @main_linkerArgs.txt'

At this point I have populated at least 10 folders relating to mingw, nim, choosenim, and nimx with the LSDL2.dll file but alas, nothing changes.

@Tormund
Copy link
Collaborator

Tormund commented Mar 25, 2023

This is looks similar to #504 did you seen this?

@tillfalko
Copy link
Author

This is how I solved the issue. Is this expected, or did I mess up during the installation?

@Tormund
Copy link
Collaborator

Tormund commented Mar 30, 2023

Yes SDL is required and not shipped with nimx. https://github.com/yglukhov/nimx/blob/master/doc/hello-world-app.md

@Tormund Tormund closed this as completed Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants