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

Running programs compiled with IFX in a DOS window

NFKirkby
New Contributor I
1,115 Views

I am almost certainly missing something very obvious... I can run programs compiled with IFX in the Visual Studio environment (F5/Ctrl F5) but if I open a DOS window and try to run the same  executable there is no output and the program, no matter how big or small terminates immediately.  It does not seem to matter if the DOS window was opened from VS or from Windows itself. No error messages, no 'Hello World' nothing! What have I missed?

System is Windows 11

VS 17.8.0

Intel® Fortran Compiler 2024.0.0 [Intel(R) 64].

(IFORT is all working fine and as expected)

0 Kudos
1 Solution
Arjen_Markus
Honored Contributor I
1,107 Views

That is a typical sign that the program tries to load DLLs and find one or more missing. It is really annoying that on Windows you sometimes get messages about it and sometimes nothing at all. In your case it would seem the redistributable DLLs are not in the path. I do not know the reason, but Steve Lionel posted an answer in another thread that might help.

You can also try and open a command prompt from the Intel oneAPI menu choices. That will set up the environment, so that the DLLs are indeed found.

I regularly use Dependency Walker (the modern version) to check for DLLs.

View solution in original post

0 Kudos
3 Replies
Arjen_Markus
Honored Contributor I
1,108 Views

That is a typical sign that the program tries to load DLLs and find one or more missing. It is really annoying that on Windows you sometimes get messages about it and sometimes nothing at all. In your case it would seem the redistributable DLLs are not in the path. I do not know the reason, but Steve Lionel posted an answer in another thread that might help.

You can also try and open a command prompt from the Intel oneAPI menu choices. That will set up the environment, so that the DLLs are indeed found.

I regularly use Dependency Walker (the modern version) to check for DLLs.

0 Kudos
NFKirkby
New Contributor I
1,068 Views

Oh thank you!

Yes, if I open from the Intel oneAPI prompt, it does work.

Thanks also for the tip about Dependency Walker

So IFORT is adding things to path, but IFX is not (yet?) at install.

I can capture the path variable from a vanilla command prompt and the OneAPI prompt and spot the differences.

Thanks again

N

 

0 Kudos
mecej4
Honored Contributor III
1,088 Views

Try adding a PAUSE statement to your Fortran source in a place where it will be executed before the program ends. Nowadays, CPUs are so fast that a program may run to completion in less than half an eye-blink.

0 Kudos
Reply