Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Artur_C_
Beginner
855 Views

running icl from command line

Jump to solution

Guys, I know intel's compiler needs VS in order to work. I have VS2013 Pro installed.

I need to run icl (your compiler) from command line. 

I've tried to run it by simply going into directory and typing icl [pathTo]main.cpp but I'm getting error:

icl: error: #10114 Microsoft Visual C++ not found in the path.

How to pass path to visual studio to icl from the command line?

Thank you.

 

0 Kudos
1 Solution
Kittur_G_Intel
Employee
855 Views
Can you try executing the compilervars.bat like (example below) It should set the environment for the VS specified in the second argument, else it will be using the default detected during installation: C:\Program Files \Intel\Composer XE 2013 SP1\bin\compilervars.bat ia32_intel64 vs2010 The above should set the environment for using VS2010 x64, compiler running on ia-32 arch generating code for 64 arch, using 64 libs. If ia32 is used only, then compiler and libs are only for ia32... _K

View solution in original post

13 Replies
MalReddy_Y_Intel
Employee
854 Views

Hi Artur,

Run Visual C++ vcvars32.bat Or pass the options "/Qvc[10|11|12]" and "/Qlocation,link,"[cl-dir]" to the icl.exe.

Reddy

 

TimP
Black Belt
854 Views
If you have Visual Studio and ICL installed correctly, running the compilervars shortcut in "build environment for Intel..." will set this up for you. A common reason for this problem, if attempting a 64-bit build, is that vcvarsall /amd64 isn't running due to failure to find \windows\system32 in PATH, i.e. you must be able to run the corresponding CL in your dos box. Using vcvars32 as suggested is OK if running the 32-bit ICL; with the 64-bit ICL, some functionality would be broken.
Artur_C_
Beginner
854 Views

Hi guys, I followed your advice and the error now I'm getting:

ScreenHunter_06 Apr. 24 19.36.jpg

Any idea how to pass the path to these libraries?

 

Thank you.

TimP
Black Belt
854 Views
It looks like you want the /Fe option. libmmt reference failures may stem from building objects with one compiler and then attempting to use another to link. Using ICL to link would presumably add more library options to what you would get with CL. If you need the Q,location,link option for 64-bit it should end with \bin\amd64\ (the path to where 64-bit link.exe is) but that should have been set up for you if you install ICL into a Visual Studio eligible for integration.
Judith_W_Intel
Employee
854 Views
I think Reddy suggested you pass cl-dir (the directory where cl is located) not the actual cl.exe command to /Qlocation,link. So please try just the bin directory as the argument. Judy
Artur_C_
Beginner
854 Views

Judith Ward (Intel) wrote:

I think Reddy suggested you pass cl-dir (the directory where cl is located) not the actual cl.exe command to /Qlocation,link. So please try just the bin directory as the argument.

Judy

If I do that I get message:

Microsoft Visual Studio not found in the path

If I pass full path including cl.exe:

ScreenHunter_07 Apr. 25 08.32.jpg

if I set path (in console I type set LIB="[libpath]") to where libmmt.lib resides I get:

ScreenHunter_08 Apr. 25 09.33.jpg

Now, I really don't know, because if now I would set the path to libcmt.lib I'm getting message that libmmt.lib isn't found.

 

Really need someone's help with this.

Thank you.

Kittur_G_Intel
Employee
856 Views
Can you try executing the compilervars.bat like (example below) It should set the environment for the VS specified in the second argument, else it will be using the default detected during installation: C:\Program Files \Intel\Composer XE 2013 SP1\bin\compilervars.bat ia32_intel64 vs2010 The above should set the environment for using VS2010 x64, compiler running on ia-32 arch generating code for 64 arch, using 64 libs. If ia32 is used only, then compiler and libs are only for ia32... _K

View solution in original post

Artur_C_
Beginner
854 Views

Kittur Ganesh (Intel) wrote:

Can you try executing the compilervars.bat like (example below) It should set the environment for the VS specified in the second argument, else it will be using the default detected during installation:

C:\Program Files \Intel\Composer XE 2013 SP1\bin\compilervars.bat ia32_intel64 vs2010

The above should set the environment for using VS2010 x64, compiler running on ia-32 arch generating code for 64 arch, using 64 libs. If ia32 is used only, then compiler and libs are only for ia32...

_K

Hi, yes, it did help. Thank you very much.

smallB

Kittur_G_Intel
Employee
854 Views
Great to know it worked, thanks for letting us know. _Kittur
Artur_C_
Beginner
854 Views

Kittur Ganesh (Intel) wrote:

Great to know it worked, thanks for letting us know.

_Kittur

You're welcome ;)

Best Regards

Artur

Godson_F_
Beginner
854 Views

the commands icl and icl++ couldn't be found on my Mac OS*. I did set the variables using compilervars.sh. Could anyone here help me figure this out please?

Judith_W_Intel
Employee
854 Views

 

icl is the name of the compiler on Windows (to match Microsoft's cl) but on MacOS we use the GNU names - icc for C and icpc for C++.

SergeyKostrov
Valued Contributor II
854 Views
>>...I did set the variables using compilervars.sh... Did you call it using a source command from .bashrc file?
Reply