- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am not sure to post the question in the best location, but since it's relating to the Fortran compiler, I thought it was the right place.
My question is very basic, I frequently use different versions of the compiler installed on my computer and for some customers I need to use a specific one (generally the latest) while for other projects I am using a previous version. I know where to select which compiler I want to use but quite often I forget to switch it back to its original setting (after build) or to select the right one to use (before build). Generally, I quickly identify the issue, but this leads to the need of a complete rebuild with the correct version. So, I was wondering if there was an extension or a possibility to be able to select the version to use directly from a toolbar menu in Visual Studio. This will easily allow us to see which version is currently selected and to be able to switch it to another one (both 32-vit and 64-bit versions at the same time or based on the selected configuration Win32 / x64).
Best regards,
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Under Tools / Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi David,
Thanks for your reply, but I already knew that.
I just asked if there was a more convenient way (in a specific toolbar menu) to see which version is currently selected and to select another one.
Best regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There are predefinned macros e.g. see https://www.intel.com/content/www/us/en/docs/fortran-compiler/developer-guide-reference/2023-1/predefined-preprocessor-symbols.html
and say __INTEL_COMPILER maybe you can use a macro to compare actual to wanted and include as a prebuild step? I would need to make some reading to work out what is possible I am just punting my thoughts.
for example the snip below will compile in a debug build but will throw errors if not, noy the best maybe but the basis for further thinking
!DIR$ IF DEFINED (_DEBUG)
retl4 = .true.
!DIR$ ELSE
retl4 = fff.false. !garbage
!DIR$ END IF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Andrew,
Thanks for posting your thoughts, maybe through a macro I could check which version of the compiler is currently selected, but it's been a couple of years that Microsoft has removed the macro feature from Visual Studio, and even in the Pre-Build Events (which I already use for updating some copyright info) I don't know how to test the compiler version to stop the build process if the version is not the one expected.
Best regards,

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page