How to execute a shell command with gcc fortran 13.4.0-1?
Thomas Wolff
towo@towo.net
Sat Apr 11 07:36:24 GMT 2026
Am 11.04.2026 um 09:31 schrieb Jean-Pierre Coulon via Cygwin:
> 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.
How FORTRAN system() invokes the command is probably more a FORTRAN
question than a cygwin question but you should try to vary path syntax
first:
C:/ibmtools/...
or rather as a POSIX path
/cygdrive/c/ibmtools/...
>
> 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