From 50ce7673e08dc1361a5742971888288e0f990257 Mon Sep 17 00:00:00 2001 From: Eduard Tolosa Date: Sat, 10 Aug 2019 16:38:54 -0500 Subject: [PATCH] Create fix-rust-windows.md --- docs/fix-rust-windows.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 docs/fix-rust-windows.md diff --git a/docs/fix-rust-windows.md b/docs/fix-rust-windows.md new file mode 100644 index 0000000..6da17ad --- /dev/null +++ b/docs/fix-rust-windows.md @@ -0,0 +1,9 @@ +If you receive messages about an undefined reference to `__onexitbegin` or something similar, you may have an older version of crt2.o, instead of the version that ming has available to it. + +Try this in your terminal and see if it helps: + +```bash +$ cd ~/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/ +$ mv crt2.o crt2.o.bak +$ cp /usr/x86_64-w64-mingw32/lib/crt2.o ./ +```