Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

Xilink Linker Error

NI_V_
Beginner
519 Views

Currently we are using build services toochain which builds our software. It has multiple versions of Visual Studio Versions from 6.0 to 9.0  I am trying to integrate the Intel C++ compiler into the toolchain. I was able to integrate the compiler by calling icl.exe from the installed distributions of Intel. However when I tried to link, using xilink.exe, I get a very unusual error which is :

LINK : fatal error LNK1181: cannot open input file '/nologo.obj'

As you see the special characters before /nologo is being inserted. But the major issue is that xilink is calling 7.0 MSVC linker . I am not sure if xilink requires MSVC linker but this is what I sw in the commnd line hwihc is as follows:

-----------------------------------------------------------

xilink: executing 'link'
Microsoft (R) Incremental Linker Version 7.10.3077
Copyright (C) Microsoft Corporation. All rights reserved.

/nologo
/verbose
/VERSION:12.1
/OPT:REF
/IGNORE:4089

---------------------------------------------------------------

Is it possible to override the MSVC version that xilink selects from 7.0 to 9.0 without chainging environment variables? I want to check if switching to MSVC 9.0 solves the issue of special character.

I want to keep modifying environment variable as the last option since it will disrupt lots of existing stuff.

Thanks much.

0 Kudos
3 Replies
TimP
Honored Contributor III
519 Views
The option /Qlocation allows setting a specific version of Microsoft tools, e.g. -Qlocation,link,"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\AMD64" This can be set in icl.cfg or in command line options.
0 Kudos
NI_V_
Beginner
519 Views
TimP (Intel) wrote:

The option /Qlocation allows setting a specific version of Microsoft tools, e.g.
-Qlocation,link,"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\AMD64"
This can be set in icl.cfg or in command line options.

Thanks for option. I have to explicitly call xilink.exe and not icl.exe (which is invoked before xilink.exe). When I provided the -Qlocation,link,"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\AMD64" as a command line parameter to Xilink.exe, I get this warning xilink: warning #10006: ignoring unknown option '-Qlocation,link,C:\Program Files ... ' On Windows I tried with both /QLocation as well as -QLocation fomats. Is there something that I am missing here?
0 Kudos
Mark_S_Intel1
Employee
519 Views
The option that Tim mentioned is for the compiler driver icl.exe not for xilink.exe. The xilink.exe does use the Microsoft linker. So you need to ensure that your path environment for your script is pointing to the correct version of the Microsoft too chain (e.g. VS2008, VS2010, etc). You can use icl.exe for your link line as well rather than using xilink directly. For example to point to the VS2008 tool chain you would use: icl /Qvc9 "/Qlocation,link,c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\\bin" /Qvc9 is for VS2008, /Qvc9 is for VS2010. The above says use the linker from the VS2008 bin directory. Note that for the above to work properly the rest of your environment needs to be set for VS2008 because of the dependencies. For example if your environment is not set correctly, you may get errors about missing Microsoft DLLs when you invoke the link.exe. The .bat files in C:\Program Files (x86)\Intel\Composer XE 2013\bin show how the Intel compiler command prompts are set up for each version of Visual Studio. --mark
0 Kudos
Reply