How to execute a shell command with gcc fortran 13.4.0-1?

Jean-Pierre Coulon coulon@oca.eu
Sat Apr 11 07:31:13 GMT 2026


This is my program:

       character*40 myorder
       myorder = 'c:\ibmtools\winvi32.exe mytest.for'
       print *, 'myorder = ', myorder
       call system(myorder)
*      call execute_command_line(myorder)
       end

but the result is:
sh: line 1: c:\ibmtools\winvi32.exe: command not found, 
although it works perfectly when I type it  in the command prompt.

The result is worse with  execute_command_line(myorder):

  Fortran runtime  error: EXECUTE_COMMAND_LINE: Invalid command line

Error termination. Backtrace:
#0  0x3ff6941a9 in ???
#1  0x3ff619d31 in ??? [...] (ten lines)
- 
Jean-Pierre Coulon                         E-mail: coulon@oca.eu


More information about the Cygwin mailing list