- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think you may be right - sorry for the mis-information. :-(
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for this. /useenv seems to be the right option - I'm looking into it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, there is nothing equivalent within Visual Studio.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry, there's nothing like that available.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page