-
Notifications
You must be signed in to change notification settings - Fork 121
Closed
Labels
type: documentationAwareness, docs, examples, etc.Awareness, docs, examples, etc.
Description
I'm facing the following issue,
When I try to initialize sdl2 from my main function, the project compiles without errors.
But when I run it, I can see that it fails in the sdl2 init call.
lib.rs
#[cfg_attr(target_os = "android", ndk_glue::main(backtrace = "on"))]
fn main() {
println!("Hello from Android!");
let _ = sdl2::init().unwrap();
}These are the entries that I'm seeing in logcat:
02-08 04:06:55.196 14840 14884 I RustStdoutStderr: Hello from Android!
02-08 04:06:55.196 14840 14884 I RustStdoutStderr: thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: "Application didn't initialize properly, did you include SDL_main.h in the file containing your main() function?"', src/lib.rs:17:36
02-08 04:06:55.196 14840 14884 I RustStdoutStderr: stack backtrace:
02-08 04:06:55.202 14840 14884 I RustStdoutStderr: note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Please let me know if you need additional details. Thanks
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
type: documentationAwareness, docs, examples, etc.Awareness, docs, examples, etc.