Community
cancel
Showing results for 
Search instead for 
Did you mean: 
cppcoder
Beginner
91 Views

Link to an X86 library with the Intel x64 compiler

Hi,

Using the command line, I'm trying to compile a program and link it to a library which was created with the 32-bit version of Intel's cpp compiler (I don't have access to the source code of that library). The generated program should be a 32bit Windows executable

icl /Qlong-double /Qpc80 /fp:extended test.cpp /link /MACHINE:X86 SomeX86lib.lib

But I get this message:

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

What are the right options to pass?

Thanks

0 Kudos
1 Reply
TimP
Black Belt
91 Views

Are you running the icl for ia32 ? icl -V will tell you. It's better not to allow any ICL environment variables in the System Properties environment variables if you intend to switch compiler versions, instead use the 32-bit visual studio .bat files to set up your environment (normally, by the shortcuts on the Start menu). You can't over-ride the 32- or 64-bit compiler environment choice by command line arguments.
Reply