Using different compiler versions

Using different compiler versions

Is it possible to select different compiler versions per solution or project? As far as I can see it's only possible to set 32-bit and 64-bit separately and those settings then apply to all projects. What I'd like to do is build one application (project) within a solution with one version of the compiler and the other projects with a different version. Driving this from the command line would be acceptable. Sounds strange but I do have reasons!


publicaciones de 13 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.

It might be possible by editing the vfproj files and setting the version number e.g.
<VisualStudioProject ProjectType="typeStaticLibrary" ProjectCreator="Intel Fortran" Keyword="Static Library" Version="11.1" ... 
No guarantee it will work, I've never tried it.


This is definetly something that should be done. Having it as a global VS setting is the wrong approach. It is very troublesome having to remember to change the settings for each project you load and have to do it twice (32 bit and 64 bit). Another issue is that if you have two projects open in different instances of Visual studio you get settings passed from one to the other and you can get in a muddle very quickly.

As far as I can see the Version string is the version of the project file not the version of the compiler so I don't think that can be used.

I think you may be right - sorry for the mis-information. :-(

This is not possible within Visual Studio. You can do this for command line development though using compilervars.bat. Each version of the compiler you have installed will have a separate compilervars.bat file


Could you explain some more please. I have a project that creates an application. If I start a command prompt with the correct compiler set how do I then use it? If I had an nmake file I could just type 'nmake'. I have a project file so don't I need to run 'devenv' from the command line? If I do that aren't the VS settings used?

To change or set up the environment to use a particular version of the compiler, you just need to run the script. When runing the script, IA32 or Intel64 and the version of visual studio to use in the command line are specified. If you already have a version of the compiler set, this will overide the current settings.

For instance, if I wanted to use the 64bit version of 12.1.5 with vs2010 integration on my machine, I would run:

"C:\Program Files (x86)\Intel\Composer XE 2011 SP1\bin\compilervars.bat" intel64 vs2010

You could incorperate this in your build system.

sgeard is using a project, not command line. So he would need to start VS using /useenv to make it use environment settings to choose the compiler. I am I right ?

Thanks for this. /useenv seems to be the right option - I'm looking into it.

Yes, there is nothing equivalent within Visual Studio.

When doing regression debugging it is aggravating to have two versions side by side and each ones compiler version setting affects the other.

The solutions mentioned above require the user to set up customised startup icons for each compiler version which is not trival to get right.

Is there any support to develop a solution level compiler version setting?  Or at least to make changes to the global setting private to the Visual Studio instance.


Sorry, there's nothing like that available.

Steve - Intel Developer Support

Deje un comentario

Por favor inicie sesión para agregar un comentario. ¿No es socio? Únase ya