Skip to content

Module Type 'X86' conflicts with machine type 'X64' #43468

Description

@vikalyan

Using a custom Windows container that contains Visual Studio 2015 Enterprise Update 3 full installation, Windows 10 SDK full installation on a X64 base OS.

Compiling a simple HelloWorld.rs program with no dependencies etc.

I get the following error.

Is there a specific flag I have to pass in? I did run the vsvars32.bat batch file to set the appropriate environment variables for VC.

error: linking with `link.exe` failed: exit code: 1112
  |
  = note: "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\link.exe" "/NOLOGO" "/NXCOMPAT" "/LIBPATH:C:\\Program Files\\Rust stable MSVC 1.18\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "HelloWorld.0.o" "/OUT:HelloWorld.exe" "/OPT:REF,NOICF" "/DEBUG" "/LIBPATH:C:\\Program Files\\Rust stable MSVC 1.18\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "C:\\Program Files\\Rust stable MSVC 1.18\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libstd-0a78323911070f99.rlib" "C:\\Program Files\\Rust stable MSVC 1.18\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librand-c279a51d66700350.rlib" "C:\\Program Files\\Rust stable MSVC 1.18\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcollections-d7bf31a4ca1ea637.rlib" "C:\\Program Files\\Rust stable MSVC 1.18\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libstd_unicode-d367c3ba0db49600.rlib" "C:\\Program Files\\Rust stable MSVC 1.18\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libpanic_unwind-2d4bf02140c11dcb.rlib" "C:\\Program Files\\Rust stable MSVC 1.18\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libunwind-add7a84d7e82d084.rlib" "C:\\Program Files\\Rust stable MSVC 1.18\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liblibc-84688accbc86d6b7.rlib" "C:\\Program Files\\Rust stable MSVC 1.18\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liballoc-fe2e68b21f0bdd7a.rlib" "C:\\Program Files\\Rust stable MSVC 1.18\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liballoc_system-7fc0381594c93f56.rlib" "C:\\Program Files\\Rust stable MSVC 1.18\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcore-ea9d77e7c23fe65c.rlib" "C:\\Program Files\\Rust stable MSVC 1.18\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcompiler_builtins-91b619d34dd1f5aa.rlib" "advapi32.lib" "ws2_32.lib" "userenv.lib" "shell32.lib" "msvcrt.lib"
  = note: msvcrt.lib(chkstk.obj) : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-linkageArea: linking into static, shared libraries and binariesC-bugCategory: This is a bug.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions