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

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

Dear all,

I just got a new FATAL error after the errorsfor IMSL. Here is it:

x64\Debug/closefile.obj : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'

I havetried the following methods:

1. project properties-->linker-->advanced taget Machine to Machine X86 (/MACHINE: IX86)

2.I have created a new platform for x64.

3. tools-->intel fortran-->complilers, I seclected x64 as my target platform and Intel fortran compiler 10.1.014 [Intel 64]

So is there anyone can solve this? Thank you all in advance.

lan

==========================================================================================

Acknowledge know as known, unknow as unknown and that is knowledge.

12 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

What you did in step 3 did not select a target platform. What that does is allow you to change the directory lists for the compiler for the different platforms.

To choose the x64 platform, click Build > Configuration Manager. Under Active Solution Platform, select In the dialog that comes up, select x64 as the new platform (it may come up by default) and then click Ok.

You have now created an x64 platform and selected it. You can change back by using the platform dropdown at the top of the VS window.

Make sure you added the right IMSL folders to the "Intel 64" version of the compiler in Tools > Options > Intel Fortran > Compilers.

Steve - Intel Developer Support

Dear Steve,
I followed your instruction and the program still gave me the same error information:

x64Debug/closefile.obj : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'

What I did for the IMSL folers is as follows:

Tools-->Options-->Intel Fortran-->compilers

for Include I added: C:Program Files (x86)VNIimslfnl600Intel64includeDLL

fpr library list I added: C:Program Files (x86)VNIimslfnl600Intel64lib

for the VC window in step 3, I selected the configuration manager and in the Platform colume I select new and build a new project platform x64, and copy settings from Win 32. I guess it is the same as you suggested.

The problem is that I still have the same error.

In that first step, you need to make sure that you selected "Intel 64" as the platform to change.

Check the Linker > Command Line property page to make sure there is no /MACHINE switch there.

Steve - Intel Developer Support

Dear all,

I have tried several changes but the error is still there.

1. I have make sure that linker>command line in the additional options I deleted /MACHINE:IX86 there. However, in the all options window, I do notice that there is '/MACHINE:IX86' and it is impossible to change it in that window.

2. My friend also suggested:

Linker->General->Additional library Directories and add one directory C:Program Files(x86)Microsoft Visual Studio 8VClib there.

Is there any other solution?

Thanks,

lan

Best Reply

You need to remove that /MACHINE:IX86. Your friend's suggestion is incorrect and will make things worse.

Try going to the Linker > Advanced property page and make sure that Target Machine is "Not Set".

Steve - Intel Developer Support

The problem has been solved. Many thanks to steve.
Here is the solution, for those might have the same problem :)
1. To choose the x64 platform, click Build > Configuration Manager. Under Active Solution Platform, select In the dialog that comes up, select x64 as the new platform (it may come up by default) and then click Ok.
2. select the x64 platform in the VC window.
3. Check the Linker > Command Line property page to make sure there is no /MACHINE switch there
3.1 if you find /MACHINE ** in the additional optionswindow, just deletle it.
3.2. if you find /MACHINE ** in the all options window,go to the Linker > Advanced property page and make sure that Target Machine is "Not Set".
lan

Please help me to locate the click "Build" command and the way to get into whatever solution you provided above.
Since i'm also getting the same issue "fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64' " while running a subroutine in abaqus. My machine is 64bit Windows platform.
Maybe i am new to it ,so please excuse me for my basic doubt.
-nikhil

Nikhil,

Hi. I would recommend the steps in the following two articles to make sure you have the Microsoft 64 bit compiler installed and also how to build a 64 bit application. Let us know on this thread if you have problems/questions.

http://software.intel.com/en-us/articles/configuring-microsoft-visual-studio-for-64-bit-applications/
http://software.intel.com/en-us/articles/building-intel-64-architecture-applications-in-microsoft-visual-studio/

------

Wendy

Attaching or including files in a post

Thanks Wendy for your response,

I was able to fix that error but now i'm getting another error:
"standardU.lib : fatal error LNK1120: 2 unresolved externals"
Also i would like to tell you that I have a Intel frotran 32 bit complier in my machine , so is it that we need 64 bit only.

------

Nikhil

If you never intend to use the 32-bit ifort, installing only the 64-bit ifort would simplify the installation.

I am not sure what might be causing that error message. If you have a test case you can post it here and I can take a look at it.

------

Wendy

Attaching or including files in a post

Leave a Comment

Please sign in to add a comment. Not a member? Join today