You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Debian 12, without libsdl2-dev installed, I have the following project. I compile with cargo b -vv (build.log) which succeeds, but when running the executable, nothing shows. Same if I add the static-link feature.
Cargo.toml:
[package]
name = "tsdl2"version = "0.1.0"edition = "2021"
[dependencies]
sdl2 = { version = "0.37.0", features = ["bundled"] }
Removing the bundled feature, then sudo apt install libsdl2-dev, recompiling and re-runing works as expected.
The text was updated successfully, but these errors were encountered:
pozix604
changed the title
"bundled" feature compiles but does not work
"bundled" feature compiles on Linux but resulting executable does not show window
Dec 11, 2024
I have the same issue. No window is made, and nothing is printed to the console. It works fine on macOS and Windows, but on linux the bundled feature transparently fails. I got the above sample working by installing the SDL2-devel package and disabling the bundled feature, as per pozix's original comment.
openSUSE Tumbleweed, Plasma 6 on Wayland, rustc 1.84.0, sdl2 crate 0.37.0
Maybe try using log::set_output_function and show everything in trace to see where the issue might come from? At this point we can only guess without logs.
On Debian 12, without
libsdl2-dev
installed, I have the following project. I compile withcargo b -vv
(build.log) which succeeds, but when running the executable, nothing shows. Same if I add thestatic-link
feature.Cargo.toml:
main.rs:
Removing the bundled feature, then
sudo apt install libsdl2-dev
, recompiling and re-runing works as expected.The text was updated successfully, but these errors were encountered: