visual studio - 32-bit .obj in 64-bit project -
i have 32-bit object file o.obj
, want use in project uses 64-bit library l.lib
.
to make .lib
happy, visual studio configuration needs set x64. however, linker throws error of error lnk1112: module machine type 'x86' conflicts target machine type 'x64'
.
i went through visual studio's linker options, nothing jumped out. there way resolve error?
i under impression 32-bit code compatible 64-bit systems, modulo libraries.
x86 executables (that is, object code compiled 32-bit x86 processors) can executed on x64 machines running 64-bit operating systems, through special compatibility mode supported jointly processor , operating system. feasible because x86 instruction set subset of x64 instruction set.
however, many elements of abi differ between x86 , x64 code, notably calling conventions , pointer size. calling convention needs match between calling code , called code, or things screw up. thus, there no straightforward way call 64-bit code 32-bit code, or vice versa.
Comments
Post a Comment