comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Running fortran exectuable using IDL spawn fails
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Running fortran exectuable using IDL spawn fails [message #93508] Tue, 09 August 2016 05:05 Go to previous message
Susanne is currently offline  Susanne
Messages: 3
Registered: August 2016
Junior Member
I cannot get a simple Fortran code to execute in my Windows 7 command prompt using the IDL 8.5.1 spawn command. I've googled for solutions, and found one that suggested to cd into the path of the exe file. I tried that and it didn't help.

I was able to re-create the result using this very simple Fortran code (test.f):

c This is a test code
write(*,*) "--- Hello World ---"
stop
end

Using "gfortran -o test test.f, I make the executable test.exe without any warnings. When I run the resulting executable manually in my command prompt, I get the expected "Hello World" output in the command prompt. When however, I run test.exe using a spawn command in IDL, after changing into the directory where the .exe resides, ...

cd, path
spawn, 'test.exe & pause'

... I only get "Press any key to continue" in the command prompt, but the expected "Hello World" output is missing. Why is the .exe file not running? I've tried simpler spawn commands, e.g., spawn, 'dir & pause', and those produce the expected result. But running the exe file with IDL spawn does not produce the expected output. Hoping that someone can give me a clue what is missing here.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Odd behavior with NaNs
Next Topic: Mapping issue with mapcontinents, /usa and /canada ......

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 11:49:10 PDT 2025

Total time taken to generate the page: 0.00489 seconds