Skip to content

Instantly share code, notes, and snippets.

@lucidfrontier45
Created September 25, 2025 05:42
Show Gist options
  • Select an option

  • Save lucidfrontier45/e6417ca9341d97baa0009a7282dbd9ce to your computer and use it in GitHub Desktop.

Select an option

Save lucidfrontier45/e6417ca9341d97baa0009a7282dbd9ce to your computer and use it in GitHub Desktop.
Prepare UCRT MinGW for Rust after installed from apt (Debian 13 or later)
MINGW_UCRT_DIR=$HOME/.local/urct-mingw
rm -rf $MINGW_UCRT_DIR
mkdir -p $MINGW_UCRT_DIR
for tool in addr2line ar as c++ c++filt cpp dlltool dllwrap elfedit g++ gcc gcc-14 gcc-ar gcc-nm gcc-ranlib gcov gcov-dump gcov-tool gprof ld lto-dump nm objcopy objdump ranlib readelf size strings strip widl windmc windres; do
ln -s /usr/bin/x86_64-w64-mingw32ucrt-$tool "$MINGW_UCRT_DIR/bin/x86_64-w64-mingw32-$tool"
done
ln -s $MINGW_UCRT_DIR/bin/x86_64-w64-mingw32-ld $MINGW_UCRT_DIR/bin/x86_64-w64-mingw32-ld.bfd
ln -s /usr/share/mingw-w64/pkg-config-crosswrapper $MINGW_UCRT_DIR/bin/x86_64-w64-mingw32-pkg-config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment