#help for sdl2 library
1 messages · Page 1 of 1 (latest)
I see you're using windows.
How did you "install" sdl2?
It's a bit more tricky on windows, since it doesn't have a global lib path like /usr/lib on *nix
You might need to add the path where you installed it as a library search path
Use the bundled feature or follow all of the instructions here https://github.com/Rust-SDL2/rust-sdl2#windows-msvc (you may need to use one of the Windows instruction paragraphs below this one depending on your tool chain)
I installed the zip file
But the linker would need to know where you extracted the zip
But before that, check out the suggestion by @paper orbit
It will probably make your life easier
Don't absolute paths begin with a drive letter on windows?
So C:\Program Files\...
You might also want to wrap the path in double quotes as well.
But definitely check out the advice above
gives same error
you mean this?
no, I mean this
yeah I've been following that
Did you try using the bundled feature?
No I don't really understand that
[dependencies. sdl2]
version = ...
features = ["bundled"]
Put what @kind shell in your Cargo.toml instead of sdl2 = "..." or however you've already specified that dependency
More info on cargo features https://doc.rust-lang.org/cargo/reference/features.html
like this?
and then compile
Yea use the latest version if you can
gives this
oof
Welp, as a last resort you could try using a different library, like macroquad for example
It's probably easier to build since it's pure rust
There probably is, but I'm out of ideas, sorry, haha.
oh ok no problem
Can you give the full error from using bundled
Your problem might be that you're missing a C compiler since the bundled feature requires one to complete sdl2 from source
The easiest way to get one would probably be downloading the Visual Studio installer and only installing the Visual Studio Build Tools
@paper orbit
Yup, see near the end of the screenshot it says "failed to execute command: program not found"
It needs cmake for the compilation process, which you can get here https://cmake.org/download/
Maybe 😅
Happy to help
nvm if I try running a normal sdl window it can compile but if I try compiling a chip 8 program I can't
Not familiar with chip8, what difference is there in that complication process
And does it return an error?
it gives this error
Can you post a screenshot of the whole thing?
So what what did you have to change to cause it to stop working (from where we resolved it before)