Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fortran in Visual Studio 2022

I installed Visual Studio 2022. I then installed Intel OneAPI Base Toolkit followed by the HPC toolkit. Everything seems fine and I am able to create a Fortran project, but I am unable to run any code. When I write a code, the run bottom is greyed out (see attachment). I have read that I need to set up the Runtime library correctly but I don't think I know how to do that. For example, when I go to Project > Settings and scroll down to IFX Intel or IFortran Intel, I see "libraries" and I can change it but I don't know what to change it to.

  • I am a newbie, so if you provide a solution please be detailed. Thank you.enter image description here
like image 729
MSHashim Avatar asked Oct 27 '25 22:10

MSHashim


1 Answers

The problem is solved now. It turns out that it was a compatibility issue between VS 2022 2.0 version and Intel OneAPI. This lastest version of VS is incompatible with Intel OneAPI Fortran. There is a workaround to manually turn on the “Use the legacy native solution and build services". See details here:

https://developercommunity.visualstudio.com/t/Cant-open-existing-fortran-projects-Ca/10051432#T-N10052680

like image 76
MSHashim Avatar answered Oct 29 '25 16:10

MSHashim