Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Using different compiler versions

Simon_Geard
New Contributor I
2,014 Views

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!

Thanks.

0 Kudos
12 Replies
Les_Neilson
Valued Contributor II
2,014 Views

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.

Les

0 Kudos
Andrew_Smith
Valued Contributor I
2,014 Views

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.

0 Kudos
Simon_Geard
New Contributor I
2,014 Views

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.

0 Kudos
Les_Neilson
Valued Contributor II
2,014 Views

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

0 Kudos
Anonymous66
Valued Contributor I
2,014 Views

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

Annalee

0 Kudos
Simon_Geard
New Contributor I
2,014 Views

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?

0 Kudos
Anonymous66
Valued Contributor I
2,014 Views

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.

0 Kudos
Andrew_Smith
Valued Contributor I
2,014 Views

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 ?

0 Kudos
Simon_Geard
New Contributor I
2,014 Views

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

0 Kudos
Anonymous66
Valued Contributor I
2,014 Views

Yes, there is nothing equivalent within Visual Studio.

0 Kudos
Andrew_Smith
Valued Contributor I
2,014 Views

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.

 

0 Kudos
Steven_L_Intel1
Employee
2,014 Views

Sorry, there's nothing like that available.

0 Kudos
Reply