I'm trying to build the OpenGL library GLFW3 according to this tutorial. CMake builds a lib in ./src/Debug, but when I try to link it, VS2017 complains:
Error LNK1112: module machine type 'x86' conflicts with target machine type 'x64'
I'm aware that changing the VS-compiler from x64 to Win32 solves the issue, but I need to build a 64-bit-version.
So is there any way to tell CMake to build a 64-version?
Related
I use conan as a dependency manager for a large C++ project. The project was built for Linux and I am porting it to Windows.
Due to this I am compiling with mingwin since that development environment is closer to mine.
However, conan knows it's running on windows and so it downloads windows binaries.
I am finding that although compilation works, linking fails because mingwin binaries and MSVC binaries are incompatible.
I am not sure if I need to try to instruct meson (my build system) to use cl as the compiler, or trick conan to download Linux libraries instead of windows.
I'm using a code written in C++, i have a problem regarding the compilation which is that my project is 64 bit, and I'm using zlib.lib, which will generate the error.
module machine type 'x64' conflicts with target machine type 'x86'
I didn't find GNU 64 bit, but what i need is only the zlib.lib as 64 bit, does it exist?
"target machine type 'x86'" looks as if you need to change a compiler option from x86 target to 64 target...
I wanted to do static linking of Qt libraries to my project. I've done some tutorial (I downloaded source version of qt and then write a configure line in VS command prompt, I build everything by jom.exe). But apparently it works only with 32 bit versions of project. I want to make it work on 64 bit.
Error is in the line:
Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)
and it's says:
qwindows.lib(main.obj) : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'
any ideas how to build it on x64 machine beacause I cannot find any useful information for this problem.
You seem to have a conflict between 32 and 64 bit libraries.
Here's a tutorial on how to build Qt statically for 32 and 64 bit.
You can not link a Win32 library to 64 bit projects,
I have a problem with cmake after I installed a new SDK 10 version (now it should be 10.0.10586.0). But when I run cmake cmakelists.txt, I got this error message:
-- Building for: Visual Studio 14 2015
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:2 (project):
No CMAKE_C_COMPILER could be found.
I googled a while but could not find the right answer. My problem is that I can use VS2015 to build my application (old projects) using the new SDK. Everything seems to be fine. But cmake will try to build one small generated project (CompilerIdCXX.vcxproj). But in this project, SDK 8 is used (which is not available in my system anymore).
Could you help me, many thanks in advance
Problem solved (sorta of), I have to reinstall an older version of SDK10 aside from the version 10.0.10586.0. It is weird that uninstalling the older version had somehow damaged the environment.
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
linking problem: fatal error LNK1112: module machine type ‘x64’ conflicts with target machine type ‘X86’
I try to compile a project, let say Project_A, for x64 and receive an LNK1112 error like this
.\x64\Debug\Project_B.obj : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'
Project_A depends on Project_B and uses its interfaces etc. My question is what of both projects is here the module machine and what the target machine? I am totally confused, because Project_B.obj in both output dirs are almost same. And compiling only Project_B succeeds. Any ideas?
It seems you are compiling your project for x64 and your project does use a library which target machine is x86. If you want your project compile for x64 machines, try reconfigure the library for x64 instead of x64. Otherwise, compile your project for x86.