title: Rust compilation under Windows produce fatal error LNK1112
body: <p>I work on a <a href="https://github.com/buxx/rollgui" rel="nofollow noreferrer">Rust program</a> under linux without compilation problems. I'm trying to compile a .exe with Windows 10.</p>
  <p>When make a <code>cargo run</code>, following error happens:</p>
  <pre><code>error: linking with `link.exe` failed: exit code: 1112
    |
    = note: &quot;C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x86\\link.exe&quot; &quot;/NOLOGO&quot; &quot;/NXCOMPAT&quot; &quot;/LIBPATH:C:\\Users\\Bastien Sevajol\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib&quot; &quot;C:\\Projets\\rollgui\\target\\debug\\build\\libm-b3dec289e32e038f\\build_script_build-b3dec289e32e038f.build_script_build.djafpf92-cgu.0.rcgu.o&quot; &quot;C:\\Projets\\rollgui\\target\\debug\\build\\libm-b3dec289e32e038f\\build_script_build-b3dec289e32e038f.build_script_build.djafpf92-cgu.1.rcgu.o&quot; &quot;C:\\Projets\\rollgui\\target\\debug\\build\\libm-b3dec289e32e038f\\build_script_build-b3dec289e32e038f.build_script_build.djafpf92-cgu.10.rcgu.o&quot; &quot;C:\\Projets\\rollgui\\target\\debug\\build\\libm-b3dec289e32e038f\\build_script_build-b3dec289e32e038f.build_script_build.djafpf92-cgu.11.rcgu.o&quot; &quot;C:\\Projets\\rollgui\\target\\debug\\build\\libm-b3dec289e32e038f\\build_script_build-b3dec289e32e038f.build_script_build.djafpf92-cgu.12.rcgu.o&quot; &quot;C:\\Projets\\rollgui\\target\\debug\\build\\libm-b3dec289e32e038f\\build_script_build-b3dec289e32e038f.build_script_build.djafpf92-cgu.13.rcgu.o&quot; &quot;C:\\Projets\\rollgui\\target\\debug\\build\\libm-b3dec289e32e038f\\build_script_build-b3dec289e32e038f.build_script_build.djafpf92-cgu.14.rcgu.o&quot; &quot;C:\\Projets\\rollgui\\target\\debug\\build\\libm-b3dec289e32e038f\\build_script_build-b3dec289e32e038f.build_script_build.djafpf92-cgu.15.rcgu.o&quot; &quot;C:\\Projets\\rollgui\\target\\debug\\build\\libm-b3dec289e32e038f\\build_script_build-b3dec289e32e038f.build_script_build.djafpf92-cgu.2.rcgu.o&quot; &quot;C:\\Projets\\rollgui\\target\\debug\\build\\libm-b3dec289e32e038f\\build_script_build-b3dec289e32e038f.build_script_build.djafpf92-cgu.3.rcgu.o&quot; &quot;C:\\Projets\\rollgui\\target\\debug\\build\\libm-b3dec289e32e038f\\build_script_build-b3dec289e32e038f.build_script_build.djafpf92-cgu.4.rcgu.o&quot; &quot;C:\\Projets\\rollgui\\target\\debug\\build\\libm-b3dec289e32e038f\\build_script_build-b3dec289e32e038f.build_script_build.djafpf92-cgu.5.rcgu.o&quot; &quot;C:\\Projets\\rollgui\\target\\debug\\build\\libm-b3dec289e32e038f\\build_script_build-b3dec289e32e038f.build_script_build.djafpf92-cgu.6.rcgu.o&quot; &quot;C:\\Projets\\rollgui\\target\\debug\\build\\libm-b3dec289e32e038f\\build_script_build-b3dec289e32e038f.build_script_build.djafpf92-cgu.7.rcgu.o&quot; &quot;C:\\Projets\\rollgui\\target\\debug\\build\\libm-b3dec289e32e038f\\build_script_build-b3dec289e32e038f.build_script_build.djafpf92-cgu.8.rcgu.o&quot; &quot;C:\\Projets\\rollgui\\target\\debug\\build\\libm-b3dec289e32e038f\\build_script_build-b3dec289e32e038f.build_script_build.djafpf92-cgu.9.rcgu.o&quot; &quot;/OUT:C:\\Projets\\rollgui\\target\\debug\\build\\libm-b3dec289e32e038f\\build_script_build-b3dec289e32e038f.exe&quot; &quot;C:\\Projets\\rollgui\\target\\debug\\build\\libm-b3dec289e32e038f\\build_script_build-b3dec289e32e038f.1n2w3hnahi183i96.rcgu.o&quot; &quot;/OPT:REF,NOICF&quot; &quot;/DEBUG&quot; &quot;/NATVIS:C:\\Users\\Bastien Sevajol\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\intrinsic.natvis&quot; &quot;/NATVIS:C:\\Users\\Bastien Sevajol\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\liballoc.natvis&quot; &quot;/NATVIS:C:\\Users\\Bastien Sevajol\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\libcore.natvis&quot; &quot;/NATVIS:C:\\Users\\Bastien Sevajol\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\libstd.natvis&quot; &quot;/LIBPATH:C:\\Projets\\rollgui\\target\\debug\\deps&quot; &quot;/LIBPATH:C:\\Users\\Bastien Sevajol\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib&quot; &quot;C:\\Users\\Bastien Sevajol\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libstd-1feb4ba9912f83e4.rlib&quot; &quot;C:\\Users\\Bastien Sevajol\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libpanic_unwind-10caf631bf17818d.rlib&quot; &quot;C:\\Users\\Bastien Sevajol\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librustc_demangle-5f5b841e7dcb5069.rlib&quot; &quot;C:\\Users\\Bastien Sevajol\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libhashbrown-886e42042440a542.rlib&quot; &quot;C:\\Users\\Bastien Sevajol\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librustc_std_workspace_alloc-fc3dfd2deda68757.rlib&quot; &quot;C:\\Users\\Bastien Sevajol\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libunwind-4765baa3d9fc6a1b.rlib&quot; &quot;C:\\Users\\Bastien Sevajol\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcfg_if-2af04b7075550e2b.rlib&quot; &quot;C:\\Users\\Bastien Sevajol\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liblibc-9f4eae3434a19b51.rlib&quot; &quot;C:\\Users\\Bastien Sevajol\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liballoc-14b08c3097e998dc.rlib&quot; &quot;C:\\Users\\Bastien Sevajol\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librustc_std_workspace_core-9c0450bb353ef0cc.rlib&quot; &quot;C:\\Users\\Bastien Sevajol\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcore-4856f32e5e48bded.rlib&quot; &quot;C:\\Users\\Bastien Sevajol\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcompiler_builtins-0f66c8d6b2ebbbc4.rlib&quot; &quot;advapi32.lib&quot; &quot;ws2_32.lib&quot; &quot;userenv.lib&quot; &quot;msvcrt.lib&quot;
    = note: msvcrt.lib(chkstk.obj) : fatal error LNK1112: type d'ordinateur module 'x86' en conflit avec le type d'ordinateur cible 'x64'
  </code></pre>
  <p>I don't know how understand the error, or what is the origin of these 32bits libs. As i am a newbie with Windows, i don't understand other responses i can found about that. What i have to do to fix that ?</p>
  <p><em>You can ask me some additional information in comments (with how to get them)</em>.</p>