Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Fatal error LNK1112

rdvsea
Beginner
973 Views

I just installed VS 2005 Pro and Intel Fortran Compiler 10.1 Professional Edition. I had CVF 6.0 before. My m/c runs Win-XP x64.

I opened up a project from CVF 6.0 and then extracted the Compaq Visual Fortran Project Items. Compilation proceeded without a problem. While linking though, I get this error:

Error 1 fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86' x64Release/ion_tables_new.obj


I checked up this forum for help on the above topic. I did find another thread relevant to this (http://software.intel.com/en-us/forums/showthread.php?t=58455). As mentioned in the thread, I have not modified the directories.

Any advice on what I might possibly be doing wrong?

Thanks.

0 Kudos
4 Replies
Steven_L_Intel1
Employee
973 Views

This reads as if you are somehow mixing the x64 compiler with the 32-bit linker. Did you do a custom install of VS2005 to select the x64 Compiler and Tools option? Did you create an "x64" solution configuration? See reply 3 in the thread you linked to for instructions.

0 Kudos
rdvsea
Beginner
973 Views

This reads as if you are somehow mixing the x64 compiler with the 32-bit linker. Did you do a custom install of VS2005 to select the x64 Compiler and Tools option? Did you create an "x64" solution configuration? See reply 3 in the thread you linked to for instructions.

I did a "Full" installation.I am assumingthis would have installed the x64 Compiler and Tools also.

Yes, Ihad already created a "x64" solution configuration in the Configuration Manager (same procedure as in the instructions you alluded to).

On going through the .dsp file from CVF (and searching for /machine:x86), I found the following:

LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386

I removed /machine:I386 from the .dsp file; loaded the project file again; extracted the Fortran Visual Project Items and then compiled (using the x64 option) and it worked fine. Looks like it is the /machine:I386 which caused the problem.

0 Kudos
Steven_L_Intel1
Employee
973 Views

Ah, yes. That would do it. Assuming that fixed the problem, then indeed you have the x64 support installed.

0 Kudos
TimP
Honored Contributor III
973 Views
This error message indicates a mixture of X64 (64-bit) and X86 (32-bit) objects. For example, you may have changed your project from 32-bit to 64-bit without rebuilding all objects and libraries.
0 Kudos
Reply