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

Several tips on using the Intel C++ Compiler for Windows

JenniferJ
Moderator
459 Views

1. Many users are using the IntelC from command line. But if you've got several version of Visual C++ installed, the IntelC's menu only provides one command window with one version of VC support. Recently we published a FAQ on how to create multiple command windows to support different versions of Visual C++. The FAQ is at "http://support.intel.com/support/performancetools/sb/CS-022992.htm".

2. About the Intel C++ Compiler, two files are important to the environment: iclvars.bat, icl.cfg. When you see any strang things from command window, check the iclvars.bat & icl.cfg to make sure the commands & directories are valid there.

3. Some users couldn't get the IDE integration to work, it's either the "Convert to use Intel C++ Project System" not there, or the property page couldn't be loaded, etc. In those cases, you can try the following to see if it helps:

  • close all the VC
  • open any command window and go to "C:Program FilesIntelCompilerVS IntegrationC++VS2005" or (2003)
  • unregister the 3 dll files 3 times: "regsvr32 /u /s dll-name"
  • register the 3 dll file 1 time: "regsvr32 /s dll-name"
  • run the proper devenv: "devenv /setup"

4. When using the IntelC within VC IDE (2003 or 2005), if the project A is depended by another project B, normally when compiling project B, it should link A automatically. But once project A is converted to IntelC, the project B won't link A automatically so you get lots of unresolved symbols. It's because of a limitation in VC. The work around is to add A.lib to the B's link manually.

Jennifer

0 Kudos
6 Replies
JenniferJ
Moderator
459 Views

About the item #4 above, there's a work around that helps easy the manual work.

With the compiler update w_cc_c_9.1.032, there's a menu item "Check Dependencies" added when you right click on a vc project. When you select it, it will display all the projects that this vc project is depending on into the "output" window. So you can just copy/paste the .lib to this project's link input.

Jennifer

0 Kudos
intvs2005
Beginner
459 Views
The ide integration of vs2005 don't work, and this method don't work for me. I'm using wcc_9.1_032.I have visual studio sdk installed
0 Kudos
JenniferJ
Moderator
459 Views

If you have VC2005 Express, the IDE integration won't work. Other editions, the IDE integration should work.

Did you follow the steps in the item3 above?

Jennifer

0 Kudos
uday
Beginner
459 Views

Hello Friends,


I am trying to build an OpenMP sample on VC6 (on Windows) and this is the error I am getting.

Linking...

xilink6: executing 'C:PROGRA~1MICROS~4VC98Binlink.exe'

openmpsample.obj : error LNK2001: unresolved external symbol _omp_get_thread_num

openmpsample.obj : error LNK2001: unresolved external symbol _omp_get_num_threads

Debug/helloworld.exe : fatal error LNK1120: 2 unresolved externals

Error executing xilink6.exe.

I think just adding omp.h, vcomp.lib and vcomp.dll to the VC installation should solve the problem. If I am correct then please tell me where I could get those headers and libs from. And please tell me what else is needed to be done if I am wrong.

Thank You,

- Uday

0 Kudos
JenniferJ
Moderator
459 Views

Depending on how you built the program (/MD or /MT), you should add one of the following libs to the linker:

libguide.lib
libguide40.lib

Those libs are under "C:Program FilesIntelCompilerC++9.1IA32Lib".

Jennifer

0 Kudos
TimP
Honored Contributor III
459 Views
Jennifer's answer assumes that Intel C++ is in use,with the option /Qopenmp . In that case, icl should take care of the linking the appropriate libguide. Microsoft doesn't supply their own OpenMP support in VC6, so icl is the most likely option.
0 Kudos
Reply