2
votes

I am try to run a sample application. This application is for 32 bit machine. but i want to run it in 64 bit machine but i get this following error:

AFE\AnyFirewallEngine\Unicode Debug\AfBenchmark.obj : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'

i use here two third party library 1. Openssl-0.9.8e
2. boost

which is already build for 64 bit.

My compiler is visual studio 2010

plz help me.................

2
Try this : stackoverflow.com/a/4364020/1064610user2166576
Can you clarify the "want" statement? Do you want to run a 32bit app on a 64bit OS (which means do nothing, btw), or do you want to compile your prior-built-32bit app source code to a 64bit target and run it on a 64bit OS?WhozCraig
Are you trying to build a 32-bit application which you'll run on a 64-bit machine? Or are you trying to build a 64-bit application? You cannot link 32-bit executables, libraries or DLLs with 64-bit executables, libraries or DLLs.David Schwartz
i want to build 32bit application on 64bit osshafiul kabir maruf
Then you need to use 32-bit builds of libraries, not 64-bit builds.David Schwartz

2 Answers

2
votes

in my case I had the same problem with openssl 1.0.2d:

fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'

the problem was solved when I run vcvars64.bat insted of vcvars32.bat. In VS15 it is at:

C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\vcvars64.bat

then I was able to run ms\do_win64a and nmake -f ms\nt.mak with no problem

1
votes

You are obviously using at least one other third party library, and the binary which you are trying to link is built for x86. You will have to find or produce an x64 binary of AFE instead.