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

Installing VS and Intel fortran

GWats1
Novo colaborador I
5.166 Visualizações

I used to have VS22 and Intel Fortran installed but had to reimage my PC and lost everything. I'm trying to get the best new stuff installed. I have D/L the VS2026 and was not sure what to pick to edit and compile my old Fortran programs. I have D/L the following files:

intel-fortran-compiler-2025.3.3.16.exe
intel-oneapi-hpc-toolkit-2025.3.1.54.exe
intel-oneapi-base-toolkit-2025.3.2.20.exe
VisualStudioSetup_2026.exe
intel-oneapi-hpc-toolkit-2025.1.1.38_offline.exe

I'm wondering which of the above and what order to install them. I think I got VS22 installed and working. 

Thanks 

1 Solução
nathn34
Novo colaborador I
5.074 Visualizações

Hey, yeah I’ve been through this exact mess after a system reset losing the whole Fortran + VS setup is painful.

From what you’re saying, you basically just want your old Fortran projects compiling again inside Visual Studio, right?

What worked for me was keeping it simple:

First install Visual Studio (looks like you already did )

Then install oneAPI Base Toolkit + HPC Toolkit (no need to run that separate intel-fortran exe if you use HPC toolkit, it already includes it)

Make sure during install you enable the VS integration option

I once installed things in random order and VS didn’t detect the compiler at all… had to redo everything.

Not sure if it helps but I just stick to Base + HPC combo now, less headache.

 

After install, does your VS show Intel Fortran project templates or still missing?

Ver solução na publicação original

34 Respostas
MarcGrodent
Novo colaborador II
3.090 Visualizações

The fact that you cannot run your executable from outside Visual Studio means that the Intel oneAPI environment is not correctly set in your PATH. Steve Lionel explained you how to add the compiler to your PATH (see his post from 06-08-2026). 

Even if the compiler is not added to your PATH, you can still run your executable as follows:

(1) Open a Windows Command Prompt (cmd);

(2) Run the "setvars.bat" file located in "C:\Program Files (x86)\Intel\oneAPI"

Screenshot 2026-07-07 100606.png

This will automatically configure the whole Intel oneAPI environment (including the compilers).

(3)From this terminal, go to your executable file and run it. The runtime libraries should be found in this case.

 

Note: Another way to setup the Intel oneAPI environment is by typing "Intel" in the Windows Search menu and then selecting "Intel oneAPI command prompt for Intel 64 for Visual Studio 202*":

Screenshot 2026-07-07 101949.png 

GWats1
Novo colaborador I
2.905 Visualizações

Hi Marc;

Thanks for the tips. I did follow what Steve said earlier and thought I had it fixed because I could compile and run the EXE within VS2026.

I found and ran the BAT file you suggested and went to the location of the formerly compiled exe and tried to run it and had the same missing DLL popups. I then went to that command prompt and can go to the folder on my network where the old EXE resides and can run the VS2026 compiled EXE with no problems, so the EXE works as long as I use the Command Window to manually type the EXE name.

I fired up VS2026 and loaded the .SLN project and did the build which seemed to work and I can Start the EXE from within VS2026 and it runs fine. When I minimize the VS2026 window and go to the folder where the EXE was just created, I still get the DLL missing popups. I switched the format from Debug to Release, and it seems to go fine until I get an error about writing to the Manifest, but it seems to create the new EXE.

I did reboot the PC after running the BAT hoping that would work, but trying to run the newly compiled EXE from the folder where it resides outside the VS2026 window gives the same missing DLL popups.

 

Is there something else to try or should I just reinstall the VS2026 and the Fortran compiler?  I'm about to retire and may have more freedom to install software without having to call Guam to get Tech Support to take over my PC in Texas and supply the Admin Password.  

MarcGrodent
Novo colaborador II
2.816 Visualizações

Fron what I understand you are exploring 3 ways to run your executable:

(1) From VS 2026: it works => OK this proves that your installation of Intel oneAPI is correct and that the runtime libraries (libmmd.dll, ...) are also correctly installed. In this case, they are automatically loaded by VS, you do not have to worry about that.

 

(2) It also seems to work from an Intel oneAPI command prompt (using "setvars.bat" or directly from the Windows Search menu as I explained you) when you manually type the exe file name and run it. The important thing to understand is that the Intel oneAPI environment is only configured INSIDE this command prompt session.

 

(3) It seems that you also try to run your exe by double-clicking it from the Windows Explorer (although this point is unclear). This will only work if the compilers are added to your system PATH (see Lionel's explanations). If double-clicking the exe file from the Explorer still gives missing DLL errors, then the compilers are probably not in the regular Windows PATH, or the wrong folder was added. To check this, please open a normal Windows command prompt (NOT the oneAPI prompt!!) and run:

where libmmd.dll

(libmmd is one of the runtime libs requested by your application)

If the answer is "Info: could not find the file ..." (or something equivalent), it means that the PATH was not correctly set up.

You can also type:

echo %PATH%

 and check if the folder "C:\Program Files (x86)\Intel\oneAPI\compiler\latest\bin" is specified somewhere. If not, this is the ultimate indication that the PATH is not correctly setup.

 

So before reinstalling VS or oneAPI, I would first check and fix the Windows PATH.

 

GWats1
Novo colaborador I
2.710 Visualizações

Hi Marc,

You were correct. My PATH is the problem.

 

GWats1_0-1783510654033.png

 

I use a Win Explorer alternative called Total Commander to copy and search for files to double click on the EXE's and that is when I get the missing DLL errors.

 

I share my EXE's with others in my group and none of them use VS2026 and would not have the PATH to the DLL's on their PC's. I guess my question is, assuming I can get my PATH corrected (I'll need Admin Rights from the IT Gods), will I just need to recompile the EXE to get the DLL's to work for other User's without VS2026 installed?  When I compiled back in the ifort days in VS19, the EXE's worked for all other users and I need to get back to that functionality.

 

This EXE is a post processor that reads the XML output file from another program that analyzes steel transmission poles, and it designs base plates and anchor bolts. My output is very crude as you can see from the attached PDF.

 

VS2026 is bugging me to upgrade to V18.7.3 which will require Admin Rights.

 

MarcGrodent
Novo colaborador II
645 Visualizações

No, fixing the Windows PATH on your side will not solve the issue for other users.

My guess is that you compile your Fortran code with a dynamic link (/libs:dll). If your code only depends on the Fortran runtime libraries (i.e. it does not use any other dependencies, such as OpenMP or MKL), a potential solution would be to use a static link (/libs:static) which means that the runtime libs will be in a way encapsulated in your exe file (whose size will increase in that case).

To do so, from VS go to the Property Pages of your project. Select Release as the current Configuration. Then Configuration Properties > Fortran > Libraries and select "Multithreaded" (instead of "Multithread DLL" which I think is the flag currently active in your project...) in the Runtime Library entry:

Screenshot 2026-07-08 152615.png

The executable should run without error on your machine by double-clicking it from the Windows Explorer (the runtime libs do not have to be on the PATH in this case). If it works, you can distribute the exe to your colleagues so that they can try on their side.

 

GWats1
Novo colaborador I
627 Visualizações

Sorry to be a PITA, and I finally stumbled onto the property dialog box and it was this:

GWats1_1-1783524310298.png

 

So I changed to this:

GWats1_2-1783524879492.png

 

Does the Deploy all box do anything to help? Or how can I set the runtime library as the default?

 

In any case thanks for putting me on the right track. If you ever want a transmission line pole base plate designed, send me a message. There are probably less than 50 engineers in the USA that do this work.   

 

 

 

 

 

 

MarcGrodent
Novo colaborador II
623 Visualizações

Just select "Multithreaded". It seems to work, right? Send the EXE to your colleagues, they should be able to use the application as it is.

No sorry I don't need a transmission line pole base plate, I work in the aerospace industry

Frank_J
Novato
645 Visualizações

If you are not using other libraries that are using DLLs, change the Libraries setting under Fortran in the project's Property Pages to Multithreaded. The resulting EXE will not require any Intel DLLs to run. If you must build an EXE that requires the runtime DLLs then your users will have to install the Fortran runtime libraries. (https://www.intel.com/content/www/us/en/developer/tools/oneapi/runtime-versions-download.html?runtimes=fortran-win - though the latest available seems to be 2025.2.1)

GWats1
Novo colaborador I
625 Visualizações

I'm not sure what libraries I use, TBH. I learned Fortran IV in 1967 in a college course and have not progressed much since then. I'm an engineer and write Fortran to solve problems like designing base plates and anchor bolts and share the EXE's with others that need to use them, and they have little knowledge on installing libraries. My user manuals are poorly written. 

I do have a logic error somewhere in this code that I need to track down before I send it out for others to use. That will likely be a project after I retire this fall. 

GWats1
Novo colaborador I
454 Visualizações

I guess I'll post a horror story here since it is somewhat related. I finally was editing my old .FOR code to make some changes using VS2026. It tells me there is an update available. I think, why not get the latest so I did the update. After an hour it was at 99% and finishing up. I checked 5 hours later and still at 99%. I ended the process in Task Manager and tried to start VS2026 and it says it is updating. I rebooted and tried again and same message. I went to Control Panel and picked Repair and about an hour later, it was finished. I pulled up the project I was working on and everything seems fine except my light theme had gone back to dark. I came back here and read the post that told me where to change back to light. Looks like I am back running again.       

andrew_4619
Colaborador honorário III
417 Visualizações

If you are shipping an exe to other users who do not have the intel compilers installed they will need to install the redistributable package that will install the dlls on their system. That is assuming your build options require dynamic linking. 

GWats1
Novo colaborador I
347 Visualizações

I was able to get the VS26 and Fortran to behave and was tracking down a bug. I figured out how to set a breakpoint and a watch window and found my logic error. During one of the sessions, it was in debug mode, and I tried to edit the code, and it said something about hotfix or something and I could not do it. I quit the debug mode, made the edits and when I went to rebuild the project, it came with a couple of errors that said something about adding /Zi or /Zl as an option. It also seems to complain about it could not write the manifest, but I can start the debug or start w/o debug, and it runs fine. The exe works fine and I was able to compile the release version and run it after I adjusted the Library for the linker like before.

Now that I shut down and started VS26 today and tried to reproduce the error, it works fine. What setting in VS26 is it asking me to set and where is it located? I tend to just run the debug, find an error, close the debug, and edit the code, then run the debug again to see where the problems are.

 

TIA 

davidwarner344
157 Visualizações

Install Visual Studio first with the Desktop development with C++ workload. Then install the latest Intel oneAPI HPC Toolkit, which includes the Fortran compiler and Visual Studio integration. You don't need both HPC Toolkit versions or the separate Fortran compiler installer.

GWats1
Novo colaborador I
85 Visualizações

I think I have everything back to semi-normal with the install after it automatically updated and I can edit and compile my Fortran again.

 

I just wish I could find the place to tell it to just notify me of an update and let me decide when/if I want to update.

Responder