Repository navigation
"This application has requested the Runtime to terminate it in a unusual way." #75
Answered
by
seritools
TheSandBoxMKG
asked this question in
Q&A
Windows 95 OSR 2.1 (Spanish language edition) running inside DOSBox-X The It's the Same executable works on Windows XP in real hardware. This is the setup script I'm using (I'm not using a #!/bin/sh
export \
CARGO_TARGET_I586_RUST9X_WINDOWS_MSVC_LINKER="lld-link" \
CARGO_TARGET_I686_RUST9X_WINDOWS_MSVC_LINKER="lld-link" \
CARGO_TARGET_I586_RUST9X_WINDOWS_MSVC_RUNNER="wine" \
CARGO_TARGET_I686_RUST9X_WINDOWS_MSVC_RUNNER="wine"
## set subsystem to WINDOWS or CONSOLE, with version 4.0 (Windows 95 and up, NT3.5 and up)
## set version 3.10 (_not_ 3.1) for Windows NT 3.1
export RUSTFLAGS="${RUSTFLAGS:+${RUSTFLAGS} }-Clink-arg=/SUBSYSTEM:CONSOLE,4.0"
export RUSTFLAGS="${RUSTFLAGS:+${RUSTFLAGS} }-Clink-arg=/OSVERSION:3.1"
## set OS version to 3.1 to work anywhere
## (NOTE: NT3.51 does _not_ like a 1MiB stack and will promptly ignore it)
export RUSTFLAGS="${RUSTFLAGS:+${RUSTFLAGS} }-Clink-arg=/STACK:131072"
export RUSTFLAGS="${RUSTFLAGS:+${RUSTFLAGS} }-Ctarget-feature=+crt-static" #statically linked runtime
#export RUSTFLAGS="${RUSTFLAGS:+${RUSTFLAGS} }-Ctarget-feature=-crt-static" # dynamically linked runtime
## rust9x links against `unicows.lib` by default, make sure it's in your search path.
#export RUSTFLAGS="${RUSTFLAGS:+${RUSTFLAGS} }-Clink-arg=/LIBPATH:/home/seri/mnt/ext4/msvc-toolchains/platformsdk3790/Lib"
## If you don't want to use `unicows.lib` (you're not targeting Windows 9x/Me), you can disable it:
#export RUSTFLAGS="${RUSTFLAGS:+${RUSTFLAGS} }-Zunicows=no"
## VC7.1: Win95 support, panic = "abort" mandatory, unwinding fails
export RUSTFLAGS="${RUSTFLAGS:+${RUSTFLAGS} }-Clink-arg=/LIBPATH:/run/media/${USER}/VC2003/lib"
export RUSTFLAGS="${RUSTFLAGS:+${RUSTFLAGS} }-Clink-arg=/LIBPATH:/run/media/${USER}/PSDK-5.2-3790/Lib"
## necessary for rust-lld, as it doesn't like the old pdb format used by VC7.1
export RUSTFLAGS="${RUSTFLAGS:+${RUSTFLAGS} }-Clink-arg=/DEBUG:NONE"
## Unwind support needs at least VC8 (VS2005)
export \
CARGO_PROFILE_DEV_PANIC="abort"
export \
CARGO_PROFILE_RELEASE_LTO="true" \
CARGO_PROFILE_RELEASE_CODEGEN_UNITS="1" \
CARGO_PROFILE_RELEASE_DEBUG="2" \
CARGO_PROFILE_RELEASE_PANIC="abort"
exec cargo +rust9x $@So… In general, I'm not getting an useful error message, what could I change to get a least some direction of what's going wrong? |
Answered by
seritools
Oct 8, 2026
Replies: 1 comment 10 replies
|
could you check if a release build works? I do have a debug-only fix coming up soon also, what CPU/instruction set is Dosbox-X emulating here? i586 will need Pentium instructions. |
10 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


fixed the debug builds in https://github.com/rust9x/rust/releases/tag/rust9x-1.99.0-v2, and added clearer compilation target list at https://github.com/rust9x/docs/blob/main/building-with-r9x.md#compilation-targets