title: I Can't Get Cross Compiling From Ubuntu To Windows Working
body: <p>I Want To Cross Compile Some Rust Code from Ubuntu to Windows, and receive an error about onexitbegin.</p>
  
  <p>Tried to follow various suggestions, but they don't have my specific error message: 
      crt2.o:crtexe.c:  (.rdata$.refptr.__onexitend[.refptr.__onexitend]+0x0): undefined reference to `__onexitend'
            collect2: error: ld returned 1 exit status</p>
  
  <pre><code>cargo build --release --target x86_64-pc-windows-gnu
  </code></pre>
  
  <p>Expected to get something built, but it blows up.
  The output says this: 
  /usr/bin/x86_64-w64-mingw32-ld: /home/vince/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/crt2.o:crtexe.c:(.rdata$.refptr.__onexitbegin[.refptr.__onexitbegin]+0x0): undefined reference to <code>__onexitbegin'
            /usr/bin/x86_64-w64-mingw32-ld: /home/vince/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/crt2.o:crtexe.c:(.rdata$.refptr.__onexitend[.refptr.__onexitend]+0x0): undefined reference to</code>__onexitend'</p>