Author Topic: Install Intel 11 Compiler  (Read 4791 times)

Offline peterfarge

  • Newcomer
  • *
  • Posts: 3
Install Intel 11 Compiler
« on: August 10, 2009, 02:14:34 pm »
Hello Forum,

I have installed the Intel Compiler under WindowsXP. I have added the path values for Codeblocks from this Link. The Visual Studio 2008 is also installed. Now I want to compile my project within CodeBlocks8.02. I'm only compiling a HelloWorld Project. The error message is:
Quote
Execution of 'icl.exe /nologo -Wall /X /ID:\Programme\IntelCompiler\Compiler\11.0\061\cpp\include /I"D:\Programme\Microsoft Visual Studio 9.0\VC\include" /I"D:\Programme\Microsoft SDKs\Windows\v7.0A\Include" /c main.c /Foobj\Release\main.obj' in 'D:\HelloWorld' failed.
Nothing to be done.
I have set the "full command line" compiler logging under "Other settings". If I use the iclvars_ia32.bat I can compile the HelloWorld Program on Dosshell. If I add iclvars_ia32.bat as a PreBuild step within CodeBlocks the error message from above stays.

Could it have something to do with the standard environment variables? Currently they are set to the Watcom Compiler. (If I compile a program without iclvars_ia32.bat, the Intel compiler outputs linker messages from the Watcom.)


Thanks

Peter


EDIT: Is the Intel C++ compiler c99 compliant at all? If I look for some headers like stdbool.h, they are not found in the intel include, nor in the Visual Studio inlude directories.
« Last Edit: August 10, 2009, 03:26:50 pm by peterfarge »

Online MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 8694
Re: Install Intel 11 Compiler
« Reply #1 on: August 10, 2009, 08:44:33 pm »
I have installed the Intel Compiler under WindowsXP. I have added the path values for Codeblocks from this Link.
I was told that Intel changed it's folder structure completely, so mostly the explanation on that site is not up-to-date anymore.
Please inspect the icl_vars.bat file for what path's exactly are setup there and setup the compiler accordingly. Most likely you have to add another folder to the additional executable path's or alike. It seams the Intel compiler cannot find one of it's components. But which one is hard to tell.

It's hard to try as IIRC none of us (devs) is using this compiler (under Windows).
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline peterfarge

  • Newcomer
  • *
  • Posts: 3
Re: Install Intel 11 Compiler
« Reply #2 on: August 11, 2009, 08:47:11 pm »
I know, and I have changed the pathes already.


This is the content of "iclvars_ia32.bat":
@call "D:\Programme\Microsoft Visual Studio 9.0\Common7\Tools\vsvars32.bat"
SET ICPP_COMPILER11=D:\Programme\IntelCompiler\Intel\Compiler\11.0\061\cpp
SET INTEL_LICENSE_FILE=C:\Program Files (x86)\Common Files\Intel\Licenses
SET PATH=%ICPP_COMPILER11%\Bin\ia32;%PATH%
SET LIB=%ICPP_COMPILER11%\Lib\ia32;%LIB%
SET INCLUDE=%ICPP_COMPILER11%\Include;%INCLUDE%

1. All changes from the MS batch file to the path variables are set to the second position. If I remove the MS batch file, I get a message from the Watcom Linker. So the Intel Compiler uses the MS Linker?
2. The path to the bin files is correct within CodeBlocks. If I set a wrong path, CodeClocks will show an err msg.
3. Lib path and include paths from Codeblocks were pointing to the same location as within the batch file.

I think I must take a closer look to the vsvars32.bat file from the Visual Studio.


Thanks

Peter

Online MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 8694
Re: Install Intel 11 Compiler
« Reply #3 on: August 11, 2009, 09:07:12 pm »
SET ICPP_COMPILER11=D:\Programme\IntelCompiler\Intel\Compiler\11.0\061\cpp
SET PATH=%ICPP_COMPILER11%\Bin\ia32;%PATH%
This is the entry for the base path of the tool chain and an additional path to be setup.

SET INTEL_LICENSE_FILE=C:\Program Files (x86)\Common Files\Intel\Licenses
This you need to set using the envvars plugin

SET LIB=%ICPP_COMPILER11%\Lib\ia32;%LIB%
SET INCLUDE=%ICPP_COMPILER11%\Include;%INCLUDE%
This you need to put into the toolchain compiler and linker options.

1. All changes from the MS batch file to the path variables are set to the second position. If I remove the MS batch file, I get a message from the Watcom Linker. So the Intel Compiler uses the MS Linker?
Watcom linker? So this compiler is in the path, too? This probably leads to conflicts. Besides: Intel may use several VS tools but most important the libs
and include files of the platformm SDK. That's why the vcvars32.bat is called IIRC.

2. The path to the bin files is correct within CodeBlocks. If I set a wrong path, CodeClocks will show an err msg.
Hopefully the others are, too (see above).

3. Lib path and include paths from Codeblocks were pointing to the same location as within the batch file.
OK...

I think I must take a closer look to the vsvars32.bat file from the Visual Studio.
Yes, because these path's are needed in the compiler and linker settings at least, too (not to forget resource compiler).

You may want to use the verbose switch of the Intel compiler... IIRC there was such. That way (and also if you enabled to log the full command line in the compiler settings) you might get a more descriptive error message.

BTW: Oce you've finished I would love to see an update to the WiKi article (if required). ;-)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline peterfarge

  • Newcomer
  • *
  • Posts: 3
Re: Install Intel 11 Compiler
« Reply #4 on: August 11, 2009, 11:07:40 pm »
- I have tried the switches "/Wall" and "/WL" but they dont show more informations.
- Yes, the resource compiler needs the same paths as the preprocessor.
- I have tried the following: Created a new HelloWorld command line program. If I complie it with CodeBlocks, I get the same error like in the first posting. If I open a Dosshell, call the iclvars_ia32.bat and then execute the command that fails within Codeblocks
Quote
icl.exe /nologo -Wall /X /ID:\Programme\IntelCompiler\Compiler\11.0\061\cpp\include /I"D:\Programme\Microsoft Visual Studio 9.0\VC\include" /I"D:\Programme\Microsoft SDKs\Windows\v7.0A\Include" /c main.c /Foobj\Release\main.obj
then I get the main.obj. Why?

If I remove the paths and only execute this command:
Quote
icl.exe /nologo -Wall /X  /c main.c /Foobj\Release\main.obj
I get the correct output.

The Intel compiler doesnt use the environment variables I have set in the Prebuild step?

Online MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 8694
Re: Install Intel 11 Compiler
« Reply #5 on: August 12, 2009, 06:38:16 am »
Quote
icl.exe /nologo -Wall /X /ID:\Programme\IntelCompiler\Compiler\11.0\061\cpp\include /I"D:\Programme\Microsoft Visual Studio 9.0\VC\include" /I"D:\Programme\Microsoft SDKs\Windows\v7.0A\Include" /c main.c /Foobj\Release\main.obj
then I get the main.obj. Why?
Are you aware that concerning the Intel docs /X removes some standard path's (whatever that means...?!).

The Intel compiler doesnt use the environment variables I have set in the Prebuild step?
The compiler does use it. Otherwise you should get a license error (IIRC). Make sure you use the EnvVars plugin to set this variable. So *not* the environment settings in the compiler setup.

I have access to an Intel compiler at work - maybe I can try there...
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline Ficko

  • Newcomer
  • *
  • Posts: 3
Re: Install Intel 11 Compiler
« Reply #6 on: December 09, 2009, 12:16:49 pm »
I am wondering that anybody was able to come up with a step by step instruction -that works- for Intel C++ (11) ? :(

The only way I can use it to put into "iclvars_ia32.bat" als last line the execution of "codeblocks.exe".
But that is so "sloppy". :)

Online MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 8694
Re: Install Intel 11 Compiler
« Reply #7 on: December 09, 2009, 09:54:40 pm »
I am wondering that anybody was able to come up with a step by step instruction -that works- for Intel C++ (11) ? :(
Look: I told you what to do. For the intel compiler working you will NEED to have everything setup correctly as in the batch file. So either you setup the variables set in the batch file globally for your Windows (user account) in the Windows options or using the EnvVars plugin within the focus of C::B.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline Ficko

  • Newcomer
  • *
  • Posts: 3
Re: Install Intel 11 Compiler
« Reply #8 on: December 10, 2009, 11:25:11 am »
...everything setup correctly as in the batch file...

Yep but there is a lot of stuff there + you have to adjust everything according to the "vsvars32.bat" and if you do that right - ca. 1 hour work - you still can't
switch cozily between 32 and 64 bit enviroment you have to do the same for "iclvars_intel64.bat". :(

So Intel made life hard. :?
What could be the solution? :shock:

Could C::B be made to bypass all the setup params and make him to use the batch files instead?
« Last Edit: December 10, 2009, 11:27:06 am by Ficko »

Offline dje

  • Lives here!
  • ****
  • Posts: 683
Re: Install Intel 11 Compiler
« Reply #9 on: December 10, 2009, 12:21:53 pm »
So Intel made life hard. :?
What could be the solution? :shock:
Change your compiler ;)

Could C::B be made to bypass all the setup params and make him to use the batch files instead?
What about launching C::B with a batch that calls VC batch before to share the same environment variables?

Dje

Online MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 8694
Re: Install Intel 11 Compiler
« Reply #10 on: December 10, 2009, 01:52:19 pm »
What about launching C::B with a batch that calls VC batch before to share the same environment variables?
Sounds convenient to me and should certainly be the most easiest solution.

Hence settings it up within C::B (and doing the "1 hour work" one time) has advantages I personally wouldn't want to miss.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline Ficko

  • Newcomer
  • *
  • Posts: 3
Re: Install Intel 11 Compiler
« Reply #11 on: December 10, 2009, 05:26:32 pm »
Quote
What about launching C::B with a batch that calls VC batch before to share the same environment variables?

I am doing just that - copied "iclvars_ia32.bat" and "iclvars_ia64.bat" into C::B main dir and execute C::B on the last line -
I just hoped there is a better way to do it without the anoying dos boxes you have to keep open. :)