I read the post about Python that was recently bumped and that helped quite a bit getting me to where I am now. But I'm just not quite there yet, I think. It might be a lack of understanding on my part about how UE works with external compilers and such. I'm running Windows 10 64-bit, latest version of UE, and using the gfortran compiler.
What I think is supposed to happen, or I hope the way it works, is I edit the code in UE, then hit the shortcut/menu item, and a DOS window pops up and I see the command line instructions to compile the code, it complies, and then the DOS window sits there so I can execute the program to test it out. Of course, it doesn't have to be the DOS window but I don't know where/how else I would be able to tell the executable to run.
The syntax to compile is: "gfortran filename.for -o filename", which would give me filename.exe. I can compile the code from anywhere as the compiler was added to the PATH variable. So if I compiled my little heat exchanger program, I would type at the command prompt: gfortran heatex.for -o heatex. If there are no errors, there is no output to the window. If there are errors, I'll get feedback in the DOS window.
What happens right now is I get the DOS window to pop up temporarily, FWIW I don't see any output in the DOS window, and then it closes. UE opens another tab called 'Command Output1' (or 2, or 3, etc.) but I never see anything in that window, nor can I type any commands or anything in that window. The code does compile successfully, but I have to manually open a command prompt and CD to the location of the code to run the .exe.
If there's an error in my code, that output does go to the Command Output tab. So that's good.
The parameters I have are as follows (I thought I was supposed to put quotes around the command line and working directory "%" parameters but that resulted in an error), attached screenshots.
For what it's worth, I tried adding "c:\windows\system32\cmd.exe" to the command line parameters in various configurations but either that's not going to work or I just couldn't get the syntax correct.
Well, this gets the code compiled correctly: "gfortran heatex.for -o heatex | c:\windows\system32.exe" but the DOS window won't stay open.
Thanks in advance for your help!
-Matt
What I think is supposed to happen, or I hope the way it works, is I edit the code in UE, then hit the shortcut/menu item, and a DOS window pops up and I see the command line instructions to compile the code, it complies, and then the DOS window sits there so I can execute the program to test it out. Of course, it doesn't have to be the DOS window but I don't know where/how else I would be able to tell the executable to run.
The syntax to compile is: "gfortran filename.for -o filename", which would give me filename.exe. I can compile the code from anywhere as the compiler was added to the PATH variable. So if I compiled my little heat exchanger program, I would type at the command prompt: gfortran heatex.for -o heatex. If there are no errors, there is no output to the window. If there are errors, I'll get feedback in the DOS window.
What happens right now is I get the DOS window to pop up temporarily, FWIW I don't see any output in the DOS window, and then it closes. UE opens another tab called 'Command Output1' (or 2, or 3, etc.) but I never see anything in that window, nor can I type any commands or anything in that window. The code does compile successfully, but I have to manually open a command prompt and CD to the location of the code to run the .exe.
If there's an error in my code, that output does go to the Command Output tab. So that's good.
The parameters I have are as follows (I thought I was supposed to put quotes around the command line and working directory "%" parameters but that resulted in an error), attached screenshots.
For what it's worth, I tried adding "c:\windows\system32\cmd.exe" to the command line parameters in various configurations but either that's not going to work or I just couldn't get the syntax correct.
Well, this gets the code compiled correctly: "gfortran heatex.for -o heatex | c:\windows\system32.exe" but the DOS window won't stay open.
Thanks in advance for your help!
-Matt