build an empty project failed (undefined reference to `__onexitbegin') #49078
Closed
Description
toolchain:
nightly-x86_64-pc-windows-msvc (default)
rustc 1.26.0-nightly (521d91c6b 2018-03-14)
build command: cargo run --target x86_64-pc-windows-gnu
error message:
.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-gnu\lib\crt2.o:crtexe.c:(.rdata$.refptr.__onexitbegin[.refptr.__onexitbegin]+0x0): undefined reference to `__onexitbegin'
.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-gnu\lib\crt2.o:crtexe.c:(.rdata$.refptr.__onexitend[.refptr.__onexitend]+0x0): undefined reference to `__onexitend'
collect2.exe: error: ld returned 1 exit status
possible reason:
-
rustc bug?
-
rustlib bug?
-
msys2 gcc issues?