Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
7683 Discussions

Link to an X86 library with the Intel x64 compiler

cppcoder
Beginner
165 Views

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
165 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