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

LNK1112 how to compile for windows XP 32bit

warpino
Beginner
1,168 Views
Hi everyone,

I'm working with Intel Visual Fortran Compiler for Windows Professional Edition 11.1 on an AMD64 machine running Windows XP (32 bit version). I'm trying to build an application for the same 32 bit OS.

In my project at linking time I got the following error

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

I guess the problem is that the .obj file I'm trying to link has been compiled at 64 bit (sorry if the terminology is inappropriate, I'm a real newbie). If my idea is correct, how do I tell the compiler to produce a 32 bit obj instead? Is there a command line option?

Thank you very much for your help,

w.
0 Kudos
2 Replies
TimP
Honored Contributor III
1,168 Views
You must install the native (ia32) compiler, and set x86 if you are using a Visual Studio project. If you are compiling from command line window, open the "Build Environment for IA-32" choice in Start>Intel Development Tools.
0 Kudos
Steven_L_Intel1
Employee
1,168 Views

The default in Visual Studio is to build a 32-bit application, and it seems you are building one, but somehow have an object module that was compiled for 64-bit. Doesn't the linker tell you the name of the object file or library module that is the problem? Are you linking to an object or library that you got from someone else?

That you are using an AMD64 processor makes no difference - since you are running 32-bit Windows, you have effectively a 32-bit system.

If you are using the command line, make sure that you start with the "Build Environment for applications running on IA-32".
0 Kudos
Reply